Skip to content

Conversation

@velzie
Copy link
Collaborator

@velzie velzie commented Aug 5, 2025

prior to this the js rewriter worked with a proxy based system, window.location getting rewritten to $wrap(window).location. this replaces it with the more heavy handed but reliable approach of checking all property accesses, eg window.location -> window.__scramjet$location or window["locat"+"ion"] -> window[$scramjet$prop("locat"+"ion")]

this is a significant change, ensure sites still work

@velzie velzie merged commit c955dfb into main Aug 5, 2025
3 checks passed
velzie added a commit that referenced this pull request Aug 29, 2025
* [core][rewriter] dpsc: partially implement WrapAccess

* [core][rewriter] dpsc: implement WrapSet and remove WrapThis

* [core][rewriter] dpsc: implement WrapGetComputed

* [core][rewriter] dpsc: fix nested WrapGet s

* [core][rewriter] dpsc: implement WrapSetComputed

* [core][rewriter] dpsc: fix nested computed gets

* [core][rewriter] dspc: change eval() from a replace rewrite to an insert rewrite to fix nesting issues

* [core][rewriter] dpsc: nuke strictchecker

* [core][rewriter] fix dpsc wrapget (#3)

* fmt

* fix

* [core] add dpsc types to config

* [core][rewriter] dpsc: fix bad rewrite with wrapcomputedgetleft

* [core][rewriter] dpsc: switch from computed wraps to dynamic property wraps

* [core] add dpsc globals

* [core] NUKE GLOBALPROXY

* [core] dpsc: proxy location for document.location too

* [core][rewriter] dpsc: fix eval rewrite

* [core][rewriter] dpsc: handle the comma operator correctly in wrapped properties

* [core] dpsc: oops

---------

Co-authored-by: Toshit Chawda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants