addStyleTag method
Adds a <link rel="stylesheet">
tag into the page with the desired url or
a <style type="text/css">
tag with the content.
Shortcut for Page.mainFrame.addStyleTag
.
Parameters:
url
: URL of the <link>
tag.
file
: CSS file to be injected into frame.
content
: Raw CSS content to be injected into frame.
Returns a Future<ElementHandle> which resolves to the added tag when the stylesheet's onload fires or when the CSS content was injected into frame.
Implementation
Future<ElementHandle> addStyleTag(
{String? url, File? file, String? content}) {
return mainFrame.addStyleTag(url: url, file: file, content: content);
}