I have a content script that adds members to Node.prototype
. These aren't visible from the Developer Console because of the "isolated world" concept at https://developer.chrome.com/extensions/content_scripts.
How can I create a Chrome Extension whose modifications to Node
are visible when using the Developer Tools Console on pages for which the extension was applied?
So the following steps would validate the solution:
- (Create the extension with various content_scripts or any other strategies to work around isolated worlds)
- Open Chrome and browse to a page for which the extension is applicable
- Open Developer Tools Console
- Enter the command
Node.newMember;
- See some POC value appear, such as a string
"Hello World"
which was set by the extension in (1)
Some background info: This is for an extension that I want to create as a timesaver to make various properties permanently accessible through $0
when selecting various nodes in the DOM.