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

[Feature] Support evaluate() as a content script #4377

Closed
tjenkinson opened this issue Nov 7, 2020 · 3 comments
Closed

[Feature] Support evaluate() as a content script #4377

tjenkinson opened this issue Nov 7, 2020 · 3 comments

Comments

@tjenkinson
Copy link
Contributor

It's possible to create a custom selector that runs as a content script like so

selectors.register(name, script, { contentScript: true });

I'd like to be able to do the same with evaluate(), so that I can run custom code in an isolated environment.

It doesn't look like this is currently supported. Would this be possible?

Thanks.

@pavelfeldman
Copy link
Member

We are creating isolated worlds for ourselves internally, so it it feasible. So we can probably accept a contribution exposing such flag. What's your use case if you don't mind sharing?

@tjenkinson
Copy link
Contributor Author

Great. I want to run a script in the page to select a random visible element, but I also want to make sure I'm using the original browser apis and not something that might have been messed with by something on the page itself.

Happy contribute this feature if you could point at the areas of code that need changing

@pavelfeldman
Copy link
Member

Closing this as a part of the triage, please feel free to file a new issue with additional details. Given the limited resource and a lot of requests, we need to fulfill most popular requests and at the same time keep our issue database manageable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants