Giter Site home page Giter Site logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
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 [email protected] on 9 Dec 2011 at 3:27

  • Changed state: Accepted

from open-webkit-sharp.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
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 [email protected] on 9 Dec 2011 at 4:56

from open-webkit-sharp.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
Then you should change the tabs and reload the browser that is selected every 
time the value is changed.

Original comment by [email protected] on 9 Dec 2011 at 8:06

from open-webkit-sharp.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
reloading isn't much of solution, isnt there a way for you to make 
UseJavaScript work
per webbrowser and not global

Original comment by [email protected] on 9 Dec 2011 at 9:13

from open-webkit-sharp.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
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 [email protected] on 10 Dec 2011 at 4:07

from open-webkit-sharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.