Method Inject
- Namespace
- DotNetBrowser.Browser.Handlers
- Assembly
- DotNetBrowser.dll
Inject(string)
Creates an InjectCssResponse that injects the given customStylesheet
string that
represents a custom stylesheet
(CSS) into the document that is loaded in this browser instance.
public static InjectCssResponse Inject(string customStylesheet)
Parameters
customStylesheet
stringThe CSS code that will be injected into the document.
Returns
- InjectCssResponse
The InjectCssResponse instance that can be used as a return value in InjectCssHandler implementation.
Remarks
If the CSS property defined in the given customStylesheet
string already exists
on the loaded HTML document, then the existing CSS property won't be overridden. The CSS
properties defined in the given customStylesheet
string will be applied only if
these properties aren't defined on the loaded document.
Exceptions
- ArgumentException
The
customStylesheet
is null, empty or blank.