Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying contentWindow in Safari/iOS #29

Open
paulmasson opened this issue Sep 3, 2022 · 0 comments
Open

Modifying contentWindow in Safari/iOS #29

paulmasson opened this issue Sep 3, 2022 · 0 comments

Comments

@paulmasson
Copy link
Owner

The function injectFunctions modifies the contentWindow of a 3D-scene to include additional function definitions, which cannot be passed via the JSON-parsed config dictionary. This works fine for both Firefox and Chrome, both for local files and those obtained from a server.

For Safari this also works for local files, but fails silently for those obtained from a server, even a local server running on the desktop. More accurately, one can modify the contentWindow and immediately return values from the added functions, but the definitions are subsequently not available as if scoped somehow. Curiously enough once the main file has been downloaded, function injection works completely from the JavaScript console in Safari.

Clearly there is some sort of security restriction in place for Safari that is nonstandard. How can this be circumvented?

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

No branches or pull requests

1 participant