--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/4ed07163-f901-4041-b1fd-81a004aac063%40chromium.org.
Why do you need C++ for that? Extensions can already do this...
☆PhistucK
On Fri, Sep 1, 2017 at 8:42 AM, Anton Smirnov <d...@antonsmirnov.name> wrote:
Hey, guys.I'm working on some content filtering library integration and it requires some JS to be executed on page load.It's not a spam, malware, etc - it just allows user to filter some undesired content.For this i need to figure out how:1) to catch "page/iframe load started" event.URL is required for it as it will generate JS script body dynamically.2) to launch JSIt seems that #1 happens in browser process and #2 happens in child process, is it correct?Should i add some IPC messages?Actually the script will subscribe to 'DOMContentLoaded' and 'load' events as it requires DOM to be built,so probably if there is a way to subscribe to that events directly it will work too.Any suggestions and starting points are highly appreciated. Thanks.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/dce9911a-0071-48ae-b6a3-ba8fe14916d3%40chromium.org.
I think WebView can inject scripts to pages.So I suggest you try to trace it, from the API to the renderer code that does that, using cs.chromium.org.
☆PhistucK
☆PhistucK
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/dce9911a-0071-48ae-b6a3-ba8fe14916d3%40chromium.org.
Hi Anton, I did some JS injections onPageLoadStarted.
In my case case it was implemented like this:
In ChromeActivity or ChromeTabbedActivity you have TabModelSelectorTabObserver with onPageLoadStarted(Tab tab, String url){...} callback. You can get WebContents via tab.getWebContents() from it. On WebContents object you call evaluateJavaScript(String script, JavaScriptCallback callback) method, where script is string with your JS code.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/dbe8f58e-f2fb-4f44-9dcf-1d991b56ddcf%40chromium.org.To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.