StylesheetLoadHandler
TheArtOfDev.HtmlRenderer.Core.Handlers
Handler for loading a stylesheet data.
Methods
CorrectRelativeUrls(string, Uri) : string
Make relative URLs absolute in the stylesheet using the URI of the stylesheet.
- stylesheet
- the stylesheet to correct
- baseUri
- the stylesheet uri to use to create absolute URLs
Returns: Corrected stylesheet
LoadStylesheet(HtmlContainerInt, string, Dictionary<string, string>, string, CssData)
Load stylesheet data from the given source. The source can be local file or web URI. First raise HtmlStylesheetLoadEventArgs event to allow the client to overwrite the stylesheet loading. If the stylesheet is downloaded from URI we will try to correct local URIs to absolute.
- htmlContainer
- the container of the html to handle load stylesheet for
- src
- the source of the element to load the stylesheet by
- attributes
- the attributes of the link element
- stylesheet
- return the stylesheet string that has been loaded (null if failed or is given)
- stylesheetData
- return stylesheet data object that was provided by overwrite (null if failed or is given)
LoadStylesheet(HtmlContainerInt, string) : string
Load stylesheet string from given source (file path or uri).
- htmlContainer
- the container of the html to handle load stylesheet for
- src
- the file path or uri to load the stylesheet from
Returns: the stylesheet string
LoadStylesheetFromFile(HtmlContainerInt, string) : string
Load the stylesheet from local file by given path.
- htmlContainer
- the container of the html to handle load stylesheet for
- path
- the stylesheet file to load
Returns: the loaded stylesheet string