HtmlStylesheetLoadEventArgs

TheArtOfDev.HtmlRenderer.Core.Entities

Invoked when a stylesheet is about to be loaded by file path or URL in 'link' element. Allows to overwrite the loaded stylesheet by providing the stylesheet data manually, or different source (file or URL) to load from. Example: The stylesheet 'href' can be non-valid URI string that is interpreted in the overwrite delegate by custom logic to pre-loaded stylesheet object If no alternative data is provided the original source will be used.

Inherits: EventArgs

Constructors

HtmlStylesheetLoadEventArgs(string, Dictionary<string, string>)

Init.

src
the source of the image (file path or URL)
attributes
collection of all the attributes that are defined on the image element

Properties

Attributes : Dictionary<string, string>

collection of all the attributes that are defined on the link element

SetSrc : string

provide the new source (file path or URL) to load stylesheet from

SetStyleSheet : string

provide the stylesheet to load

SetStyleSheetData : CssData

provide the stylesheet data to load

Src : string

the source of the stylesheet as found in the HTML (file path or URL)

Fields

_attributes : Dictionary<string, string>

collection of all the attributes that are defined on the link element

_setSrc : string

provide the new source (file path or URL) to load stylesheet from

_setStyleSheet : string

provide the stylesheet to load

_setStyleSheetData : CssData

provide the stylesheet data to load

_src : string

the source of the stylesheet as found in the HTML (file path or URL)