Closed pmeenan closed 1 year ago
Hi @pmeenan Thanks for adding this option, highly useful. However I am not able to reset the execution context to main after performing some action inside iframe. Could you pls provide an example of that. Thanks!
@manpreet-compro As best as I can tell from the code, using setexecutioncontext
with no parameters should result in the execution context being reset to the default.
@pmeenan Thanks for quick reply. I tried that already but that is not working as expected. Not sure what is the issue, will post details on a separate thread.
I have added details on https://github.com/WPO-Foundation/wptagent/issues/616. I am looking at the code in case I am able to locate the cause of this. If someone can help, that will be much appreciated
This enables cross-origin frame scripting for Chromium browsers (might work on iOS as well, haven't tested there yet).
It collects the available execution contexts from Chromium browsers and adds it to the page data json as execution_contexts:
It also adds a new script command,
setExecutionContext
that lets you match one of the available contexts by id, origin or name (though name is always blank as best as I can tell) and any future exec commands will target that context (and it can be reset to the main document by not passing a match).