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
(Default) mode to execute scripts in the content scope #1427
Comments
My gut tells me that method of execution should be via some sort of custom protocol handler ( https://developer.mozilla.org/En/NsIProtocolHandler ), guaranteeing that the appropriate URL will be outside the same-origin to any page (thus the script content is unreadable to the page). Then injection is just adding a Perhaps |
I've also started thinking more recently that perhaps in the case of |
As implemented in arantius/greasemonkey@41d0da5 things seem to work as intended so far, but we definitely still get the file/line number confusion that we always have from the |
I've tried the protocol handler route. It only half works. It's implemented; opening the appropriate URL via the URL bar shows the expected contents. But putting a <script> node in the page with src= that URL does not work. I don't know why yet. |
Correction: all but the last script does run. The last one doesn't, and above I was only running one. Even more confusing. |
Fixed the last-doesn't-run issue, the protocol handler's channel wasn't quite implemented right. But we need a DOM to inject the script node into -- and that doesn't exist yet at document-start. The best solution I know of right now is to keep the protocol handler (still useful for referencing resources, maybe), but use it as the URL parameter to |
Custom protocol handler stuff is implemented in https://github.com/arantius/greasemonkey/tree/pure-content -- but it's working poorly enough that I'm going to defer doing that at all and call this fixed. Fixed by 41d0da5 . |
No eval, no sandbox at all! Refs greasemonkey#1427
This issue is to track and discuss issues that arise if we run scripts in the content scope. To begin with:
@require
s?The text was updated successfully, but these errors were encountered: