Open GoogleCodeExporter opened 8 years ago
That's true. What I suggest is create a class which represents the
WebKitBrowser object and add a property called PrivateScriptingEnabled
(boolean). Then set that property to the value you want and add a handler to
TabChanged event and detect if that value is set to true then also set
UseJavascript to true and the opposite. Code example:
public class MyBrowser : WebKit.WebKitBrowser
{
public bool PrivateScriptingEnabled { get; set; }
}
private void TabChanged(...)
{
br = ((MyBrowser)currenttab.Controls[0]);
br.UseJavaScript = br.PrivateScriptingEnabled;
}
This has to be done because by changing the UseJavaScript property the
preferences of the whole engine change.
Original comment by tsumalis96@gmail.com
on 9 Dec 2011 at 3:27
so if UseJavaScript is global to the engine then is should only be in the
WebKit.GlobalPreferences not per webbrowser Properties .
the above will not work with my problem:
i have an option to auto open a list of address in the same time to diffrent
webbrowsers/tabs some of the address i need to disable scripting your
example only works with one at a time.
ie has restricted sites list which disable script i have used something like
this
but it only work when opening one at a time and not multi address/tabs
Original comment by meirb...@gmail.com
on 9 Dec 2011 at 4:56
Then you should change the tabs and reload the browser that is selected every
time the value is changed.
Original comment by tsumalis96@gmail.com
on 9 Dec 2011 at 8:06
reloading isn't much of solution, isnt there a way for you to make
UseJavaScript work
per webbrowser and not global
Original comment by meirb...@gmail.com
on 9 Dec 2011 at 9:13
WebKit does not provide that functionality, so unless you go into the source of
WebKit and modify it, it is not possible to do sth like that. Unfortunately I
am not able to change the source of WebKit since I don't have the knowledge. I
only read it to implement features to OWS, I cannot build my own build.
Original comment by tsumalis96@gmail.com
on 10 Dec 2011 at 4:07
Original issue reported on code.google.com by
meirb...@gmail.com
on 9 Dec 2011 at 2:14