[webkit-gtk] How to get the CSS rules that are defined in a document

Xan xan.lopez at gmail.com
Fri Sep 23 07:40:50 PDT 2011


On Wed, Sep 21, 2011 at 9:33 PM, Emmanuel Rodriguez
<emmanuel.rodriguez at gmail.com> wrote:
> Hi,
>
> Is it possible to use WebKit for listing the CSS rules that are
> defined in a document?
>
> I can see that the following classes exist:
> DOMCSSRule
> DOMCSSRuleList
> DOMCSSStyleDeclaration
> DOMCSSStyleSheet
> DOMCSSValue
>
> But I don't find a way to access them through the WebKit API.

The way to access those things with WebKitGTK+ is through our GObject
DOM bindings. We are working on documenting them as we speak, but the
main entry point is webkit_web_view_get_dom_document (). From there
you can access the global stylesheets (get_stylesheets), or the style
of any object in the DOM tree and then modify its CSSStyleDeclaration.

Hope that helps,

Xan


>
> --
> Emmanuel Rodriguez
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk
>


More information about the webkit-gtk mailing list