Skip to content
This repository was archived by the owner on May 6, 2019. It is now read-only.
This repository was archived by the owner on May 6, 2019. It is now read-only.

how to add css rules ? #40

@gomidas

Description

@gomidas

How can we create css rules for webKit browser ?

I was doing it like this on default browser...

IHTMLDocument2 currentDocument = (IHTMLDocument2)webBrowser1.Document.DomDocument;

                int length = currentDocument.styleSheets.length;
                IHTMLStyleSheet styleSheet = currentDocument.createStyleSheet(@"", length + 1);
                TextReader reader = new StreamReader(Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "cssFile.css"));
                string style = reader.ReadToEnd();
                styleSheet.cssText = style;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions