mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
5ff205dc8b
* fix: extends `ElementHandle` to `Node`s (#8552)
837 B
837 B
sidebar_label |
---|
Page.addStyleTag |
Page.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.
Signature:
class Page {
addStyleTag(options: {
url?: string;
path?: string;
content?: string;
}): Promise<ElementHandle<Node>>;
}
Parameters
Parameter | Type | Description |
---|---|---|
options | { url?: string; path?: string; content?: string; } |
Returns:
Promise<ElementHandle<Node>>
Promise which resolves to the added tag when the stylesheet's onload fires or when the CSS content was injected into frame.