--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.
I would imagine it will not be hard to add that information to DOM changes and events (due to the isolated world concept), however, extensions can add scripts to the context of the page (add a <script> to the page) as well, which makes it pretty much impossible to know whether the event that this added <script> created came from extension code, or page code.
So, basically, if you are only interested in content script (and not <script> added to the page by the content script) originated events and DOM changes, I imagine that would be possible (unless you consider events that were artificially fired by the page itself to also be page originated and not content script originated, even though they cause content script code to run and do stuff like DOM changes and fire more events).
Somehow., I do not think that would be enough for you. :)
☆PhistucK
On Tue, Jan 17, 2017 at 9:47 PM, Michael C. <mik...@gmail.com> wrote:
Hi all,I planning on forking the Chromium project and would like to experiment with adding some additional functionality.1) I am trying to find out if it is possible to determine if an event was originated by the page (ie. user or a loaded JavaScript file) or by a extension's content script.2) I'm also wondering if it is possible to track where changes to the DOM originated from (page or content script again).I realize there are other methods to fire events (such as through applications and bookmarklets) but extension content scripts are my real focus. I believe 2) might be possible due to the Isolated Worlds principle that exists for Chrome extensions (whereby content scripts and pages share the DOM but not the JavaScript objects which represent it). However, 1) seems less likely to already exist as content scripts and page JavaScript run in the same process.In either case, any pointers to where to look for this code would be much appreciated.Kind regards,Michael C.
--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.
elem.click();
elem.dispatchEvent(new Event("click", {fromExtension: true}));