Actions and events related to the inspected page belong to the page domain.
Actions and events related to the inspected page belong to the page domain.
(add-script-to-evaluate-on-load)
(add-script-to-evaluate-on-load {:as params :keys [script-source]})
(add-script-to-evaluate-on-load connection {:as params :keys [script-source]})
Deprecated, please use addScriptToEvaluateOnNewDocument instead.
Parameters map keys:
Key | Description |
---|---|
:script-source | null |
Return map keys:
Key | Description |
---|---|
:identifier | Identifier of the added script. |
Deprecated, please use addScriptToEvaluateOnNewDocument instead. Parameters map keys: Key | Description ---------------|------------ :script-source | null Return map keys: Key | Description ------------|------------ :identifier | Identifier of the added script.
(add-script-to-evaluate-on-new-document)
(add-script-to-evaluate-on-new-document {:as params :keys [source]})
(add-script-to-evaluate-on-new-document connection {:as params :keys [source]})
Evaluates given script in every frame upon creation (before loading frame's scripts).
Parameters map keys:
Key | Description |
---|---|
:source | null |
Return map keys:
Key | Description |
---|---|
:identifier | Identifier of the added script. |
Evaluates given script in every frame upon creation (before loading frame's scripts). Parameters map keys: Key | Description --------|------------ :source | null Return map keys: Key | Description ------------|------------ :identifier | Identifier of the added script.
(bring-to-front)
(bring-to-front {:as params :keys []})
(bring-to-front connection {:as params :keys []})
Brings page to front (activates tab).
Brings page to front (activates tab).
(capture-screenshot)
(capture-screenshot {:as params :keys [format quality clip from-surface]})
(capture-screenshot connection
{:as params :keys [format quality clip from-surface]})
Capture page screenshot.
Parameters map keys:
Key | Description |
---|---|
:format | Image compression format (defaults to png). (optional) |
:quality | Compression quality from range [0..100] (jpeg only). (optional) |
:clip | Capture the screenshot of a given region only. (optional) |
:from-surface | Capture the screenshot from the surface, rather than the view. Defaults to true. (optional) |
Return map keys:
Key | Description |
---|---|
:data | Base64-encoded image data. |
Capture page screenshot. Parameters map keys: Key | Description --------------|------------ :format | Image compression format (defaults to png). (optional) :quality | Compression quality from range [0..100] (jpeg only). (optional) :clip | Capture the screenshot of a given region only. (optional) :from-surface | Capture the screenshot from the surface, rather than the view. Defaults to true. (optional) Return map keys: Key | Description ------|------------ :data | Base64-encoded image data.
(clear-device-metrics-override)
(clear-device-metrics-override {:as params :keys []})
(clear-device-metrics-override connection {:as params :keys []})
Clears the overriden device metrics.
Clears the overriden device metrics.
(clear-device-orientation-override)
(clear-device-orientation-override {:as params :keys []})
(clear-device-orientation-override connection {:as params :keys []})
Clears the overridden Device Orientation.
Clears the overridden Device Orientation.
(clear-geolocation-override)
(clear-geolocation-override {:as params :keys []})
(clear-geolocation-override connection {:as params :keys []})
Clears the overriden Geolocation Position and Error.
Clears the overriden Geolocation Position and Error.
(create-isolated-world)
(create-isolated-world {:as params
:keys [frame-id world-name grant-univeral-access]})
(create-isolated-world connection
{:as params
:keys [frame-id world-name grant-univeral-access]})
Creates an isolated world for the given frame.
Parameters map keys:
Key | Description |
---|---|
:frame-id | Id of the frame in which the isolated world should be created. |
:world-name | An optional name which is reported in the Execution Context. (optional) |
:grant-univeral-access | Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. (optional) |
Return map keys:
Key | Description |
---|---|
:execution-context-id | Execution context of the isolated world. |
Creates an isolated world for the given frame. Parameters map keys: Key | Description -----------------------|------------ :frame-id | Id of the frame in which the isolated world should be created. :world-name | An optional name which is reported in the Execution Context. (optional) :grant-univeral-access | Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. (optional) Return map keys: Key | Description ----------------------|------------ :execution-context-id | Execution context of the isolated world.
(delete-cookie)
(delete-cookie {:as params :keys [cookie-name url]})
(delete-cookie connection {:as params :keys [cookie-name url]})
Deletes browser cookie with given name, domain and path.
Parameters map keys:
Key | Description |
---|---|
:cookie-name | Name of the cookie to remove. |
:url | URL to match cooke domain and path. |
Deletes browser cookie with given name, domain and path. Parameters map keys: Key | Description -------------|------------ :cookie-name | Name of the cookie to remove. :url | URL to match cooke domain and path.
(disable)
(disable {:as params :keys []})
(disable connection {:as params :keys []})
Disables page domain notifications.
Disables page domain notifications.
(enable)
(enable {:as params :keys []})
(enable connection {:as params :keys []})
Enables page domain notifications.
Enables page domain notifications.
(get-app-manifest)
(get-app-manifest {:as params :keys []})
(get-app-manifest connection {:as params :keys []})
Return map keys:
Key | Description |
---|---|
:url | Manifest location. |
:errors | null |
:data | Manifest content. (optional) |
Return map keys: Key | Description --------|------------ :url | Manifest location. :errors | null :data | Manifest content. (optional)
(get-cookies)
(get-cookies {:as params :keys []})
(get-cookies connection {:as params :keys []})
Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies
field.
Return map keys:
Key | Description |
---|---|
:cookies | Array of cookie objects. |
Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field. Return map keys: Key | Description ---------|------------ :cookies | Array of cookie objects.
(get-layout-metrics)
(get-layout-metrics {:as params :keys []})
(get-layout-metrics connection {:as params :keys []})
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
Return map keys:
Key | Description |
---|---|
:layout-viewport | Metrics relating to the layout viewport. |
:visual-viewport | Metrics relating to the visual viewport. |
:content-size | Size of scrollable area. |
Returns metrics relating to the layouting of the page, such as viewport bounds/scale. Return map keys: Key | Description -----------------|------------ :layout-viewport | Metrics relating to the layout viewport. :visual-viewport | Metrics relating to the visual viewport. :content-size | Size of scrollable area.
(get-navigation-history)
(get-navigation-history {:as params :keys []})
(get-navigation-history connection {:as params :keys []})
Returns navigation history for the current page.
Return map keys:
Key | Description |
---|---|
:current-index | Index of the current navigation history entry. |
:entries | Array of navigation history entries. |
Returns navigation history for the current page. Return map keys: Key | Description ---------------|------------ :current-index | Index of the current navigation history entry. :entries | Array of navigation history entries.
(get-resource-content)
(get-resource-content {:as params :keys [frame-id url]})
(get-resource-content connection {:as params :keys [frame-id url]})
Returns content of the given resource.
Parameters map keys:
Key | Description |
---|---|
:frame-id | Frame id to get resource for. |
:url | URL of the resource to get content for. |
Return map keys:
Key | Description |
---|---|
:content | Resource content. |
:base64-encoded | True, if content was served as base64. |
Returns content of the given resource. Parameters map keys: Key | Description ----------|------------ :frame-id | Frame id to get resource for. :url | URL of the resource to get content for. Return map keys: Key | Description ----------------|------------ :content | Resource content. :base64-encoded | True, if content was served as base64.
(get-resource-tree)
(get-resource-tree {:as params :keys []})
(get-resource-tree connection {:as params :keys []})
Returns present frame / resource tree structure.
Return map keys:
Key | Description |
---|---|
:frame-tree | Present frame / resource tree structure. |
Returns present frame / resource tree structure. Return map keys: Key | Description ------------|------------ :frame-tree | Present frame / resource tree structure.
(handle-java-script-dialog)
(handle-java-script-dialog {:as params :keys [accept prompt-text]})
(handle-java-script-dialog connection {:as params :keys [accept prompt-text]})
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
Parameters map keys:
Key | Description |
---|---|
:accept | Whether to accept or dismiss the dialog. |
:prompt-text | The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog. (optional) |
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). Parameters map keys: Key | Description -------------|------------ :accept | Whether to accept or dismiss the dialog. :prompt-text | The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog. (optional)
(navigate)
(navigate {:as params :keys [url referrer transition-type]})
(navigate connection {:as params :keys [url referrer transition-type]})
Navigates current page to the given URL.
Parameters map keys:
Key | Description |
---|---|
:url | URL to navigate the page to. |
:referrer | Referrer URL. (optional) |
:transition-type | Intended transition type. (optional) |
Return map keys:
Key | Description |
---|---|
:frame-id | Frame id that will be navigated. |
Navigates current page to the given URL. Parameters map keys: Key | Description -----------------|------------ :url | URL to navigate the page to. :referrer | Referrer URL. (optional) :transition-type | Intended transition type. (optional) Return map keys: Key | Description ----------|------------ :frame-id | Frame id that will be navigated.
(navigate-to-history-entry)
(navigate-to-history-entry {:as params :keys [entry-id]})
(navigate-to-history-entry connection {:as params :keys [entry-id]})
Navigates current page to the given history entry.
Parameters map keys:
Key | Description |
---|---|
:entry-id | Unique id of the entry to navigate to. |
Navigates current page to the given history entry. Parameters map keys: Key | Description ----------|------------ :entry-id | Unique id of the entry to navigate to.
(print-to-pdf)
(print-to-pdf {:as params
:keys [landscape display-header-footer print-background scale
paper-width paper-height margin-top margin-bottom
margin-left margin-right page-ranges
ignore-invalid-page-ranges]})
(print-to-pdf connection
{:as params
:keys [landscape display-header-footer print-background scale
paper-width paper-height margin-top margin-bottom
margin-left margin-right page-ranges
ignore-invalid-page-ranges]})
Print page as PDF.
Parameters map keys:
Key | Description |
---|---|
:landscape | Paper orientation. Defaults to false. (optional) |
:display-header-footer | Display header and footer. Defaults to false. (optional) |
:print-background | Print background graphics. Defaults to false. (optional) |
:scale | Scale of the webpage rendering. Defaults to 1. (optional) |
:paper-width | Paper width in inches. Defaults to 8.5 inches. (optional) |
:paper-height | Paper height in inches. Defaults to 11 inches. (optional) |
:margin-top | Top margin in inches. Defaults to 1cm (~0.4 inches). (optional) |
:margin-bottom | Bottom margin in inches. Defaults to 1cm (~0.4 inches). (optional) |
:margin-left | Left margin in inches. Defaults to 1cm (~0.4 inches). (optional) |
:margin-right | Right margin in inches. Defaults to 1cm (~0.4 inches). (optional) |
:page-ranges | Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. (optional) |
:ignore-invalid-page-ranges | Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false. (optional) |
Return map keys:
Key | Description |
---|---|
:data | Base64-encoded pdf data. |
Print page as PDF. Parameters map keys: Key | Description ----------------------------|------------ :landscape | Paper orientation. Defaults to false. (optional) :display-header-footer | Display header and footer. Defaults to false. (optional) :print-background | Print background graphics. Defaults to false. (optional) :scale | Scale of the webpage rendering. Defaults to 1. (optional) :paper-width | Paper width in inches. Defaults to 8.5 inches. (optional) :paper-height | Paper height in inches. Defaults to 11 inches. (optional) :margin-top | Top margin in inches. Defaults to 1cm (~0.4 inches). (optional) :margin-bottom | Bottom margin in inches. Defaults to 1cm (~0.4 inches). (optional) :margin-left | Left margin in inches. Defaults to 1cm (~0.4 inches). (optional) :margin-right | Right margin in inches. Defaults to 1cm (~0.4 inches). (optional) :page-ranges | Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. (optional) :ignore-invalid-page-ranges | Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false. (optional) Return map keys: Key | Description ------|------------ :data | Base64-encoded pdf data.
(reload)
(reload {:as params :keys [ignore-cache script-to-evaluate-on-load]})
(reload connection {:as params :keys [ignore-cache script-to-evaluate-on-load]})
Reloads given page optionally ignoring the cache.
Parameters map keys:
Key | Description |
---|---|
:ignore-cache | If true, browser cache is ignored (as if the user pressed Shift+refresh). (optional) |
:script-to-evaluate-on-load | If set, the script will be injected into all frames of the inspected page after reload. (optional) |
Reloads given page optionally ignoring the cache. Parameters map keys: Key | Description ----------------------------|------------ :ignore-cache | If true, browser cache is ignored (as if the user pressed Shift+refresh). (optional) :script-to-evaluate-on-load | If set, the script will be injected into all frames of the inspected page after reload. (optional)
(remove-script-to-evaluate-on-load)
(remove-script-to-evaluate-on-load {:as params :keys [identifier]})
(remove-script-to-evaluate-on-load connection {:as params :keys [identifier]})
Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
Parameters map keys:
Key | Description |
---|---|
:identifier | null |
Deprecated, please use removeScriptToEvaluateOnNewDocument instead. Parameters map keys: Key | Description ------------|------------ :identifier | null
(remove-script-to-evaluate-on-new-document)
(remove-script-to-evaluate-on-new-document {:as params :keys [identifier]})
(remove-script-to-evaluate-on-new-document connection
{:as params :keys [identifier]})
Removes given script from the list.
Parameters map keys:
Key | Description |
---|---|
:identifier | null |
Removes given script from the list. Parameters map keys: Key | Description ------------|------------ :identifier | null
(request-app-banner)
(request-app-banner {:as params :keys []})
(request-app-banner connection {:as params :keys []})
(screencast-frame-ack)
(screencast-frame-ack {:as params :keys [session-id]})
(screencast-frame-ack connection {:as params :keys [session-id]})
Acknowledges that a screencast frame has been received by the frontend.
Parameters map keys:
Key | Description |
---|---|
:session-id | Frame number. |
Acknowledges that a screencast frame has been received by the frontend. Parameters map keys: Key | Description ------------|------------ :session-id | Frame number.
(search-in-resource)
(search-in-resource {:as params
:keys [frame-id url query case-sensitive is-regex]})
(search-in-resource connection
{:as params
:keys [frame-id url query case-sensitive is-regex]})
Searches for given string in resource content.
Parameters map keys:
Key | Description |
---|---|
:frame-id | Frame id for resource to search in. |
:url | URL of the resource to search in. |
:query | String to search for. |
:case-sensitive | If true, search is case sensitive. (optional) |
:is-regex | If true, treats string parameter as regex. (optional) |
Return map keys:
Key | Description |
---|---|
:result | List of search matches. |
Searches for given string in resource content. Parameters map keys: Key | Description ----------------|------------ :frame-id | Frame id for resource to search in. :url | URL of the resource to search in. :query | String to search for. :case-sensitive | If true, search is case sensitive. (optional) :is-regex | If true, treats string parameter as regex. (optional) Return map keys: Key | Description --------|------------ :result | List of search matches.
(set-ad-blocking-enabled)
(set-ad-blocking-enabled {:as params :keys [enabled]})
(set-ad-blocking-enabled connection {:as params :keys [enabled]})
Enable Chrome's experimental ad filter on all sites.
Parameters map keys:
Key | Description |
---|---|
:enabled | Whether to block ads. |
Enable Chrome's experimental ad filter on all sites. Parameters map keys: Key | Description ---------|------------ :enabled | Whether to block ads.
(set-auto-attach-to-created-pages)
(set-auto-attach-to-created-pages {:as params :keys [auto-attach]})
(set-auto-attach-to-created-pages connection {:as params :keys [auto-attach]})
Controls whether browser will open a new inspector window for connected pages.
Parameters map keys:
Key | Description |
---|---|
:auto-attach | If true, browser will open a new inspector window for every page created from this one. |
Controls whether browser will open a new inspector window for connected pages. Parameters map keys: Key | Description -------------|------------ :auto-attach | If true, browser will open a new inspector window for every page created from this one.
(set-device-metrics-override)
(set-device-metrics-override {:as params
:keys [width height device-scale-factor mobile
scale screen-width screen-height position-x
position-y dont-set-visible-size
screen-orientation]})
(set-device-metrics-override connection
{:as params
:keys [width height device-scale-factor mobile
scale screen-width screen-height position-x
position-y dont-set-visible-size
screen-orientation]})
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
Parameters map keys:
Key | Description |
---|---|
:width | Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. |
:height | Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. |
:device-scale-factor | Overriding device scale factor value. 0 disables the override. |
:mobile | Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more. |
:scale | Scale to apply to resulting view image. Ignored in |
:screen-width | Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |
:screen-height | Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |
:position-x | Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |
:position-y | Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |
:dont-set-visible-size | Do not set visible view size, rely upon explicit setVisibleSize call. (optional) |
:screen-orientation | Screen orientation override. (optional) |
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). Parameters map keys: Key | Description -----------------------|------------ :width | Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. :height | Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. :device-scale-factor | Overriding device scale factor value. 0 disables the override. :mobile | Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more. :scale | Scale to apply to resulting view image. Ignored in |fitWindow| mode. (optional) :screen-width | Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional) :screen-height | Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional) :position-x | Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional) :position-y | Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. (optional) :dont-set-visible-size | Do not set visible view size, rely upon explicit setVisibleSize call. (optional) :screen-orientation | Screen orientation override. (optional)
(set-device-orientation-override)
(set-device-orientation-override {:as params :keys [alpha beta gamma]})
(set-device-orientation-override connection
{:as params :keys [alpha beta gamma]})
Overrides the Device Orientation.
Parameters map keys:
Key | Description |
---|---|
:alpha | Mock alpha |
:beta | Mock beta |
:gamma | Mock gamma |
Overrides the Device Orientation. Parameters map keys: Key | Description -------|------------ :alpha | Mock alpha :beta | Mock beta :gamma | Mock gamma
(set-document-content)
(set-document-content {:as params :keys [frame-id html]})
(set-document-content connection {:as params :keys [frame-id html]})
Sets given markup as the document's HTML.
Parameters map keys:
Key | Description |
---|---|
:frame-id | Frame id to set HTML for. |
:html | HTML content to set. |
Sets given markup as the document's HTML. Parameters map keys: Key | Description ----------|------------ :frame-id | Frame id to set HTML for. :html | HTML content to set.
(set-geolocation-override)
(set-geolocation-override {:as params :keys [latitude longitude accuracy]})
(set-geolocation-override connection
{:as params :keys [latitude longitude accuracy]})
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
Parameters map keys:
Key | Description |
---|---|
:latitude | Mock latitude (optional) |
:longitude | Mock longitude (optional) |
:accuracy | Mock accuracy (optional) |
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. Parameters map keys: Key | Description -----------|------------ :latitude | Mock latitude (optional) :longitude | Mock longitude (optional) :accuracy | Mock accuracy (optional)
(set-touch-emulation-enabled)
(set-touch-emulation-enabled {:as params :keys [enabled configuration]})
(set-touch-emulation-enabled connection
{:as params :keys [enabled configuration]})
Toggles mouse event-based touch event emulation.
Parameters map keys:
Key | Description |
---|---|
:enabled | Whether the touch event emulation should be enabled. |
:configuration | Touch/gesture events configuration. Default: current platform. (optional) |
Toggles mouse event-based touch event emulation. Parameters map keys: Key | Description ---------------|------------ :enabled | Whether the touch event emulation should be enabled. :configuration | Touch/gesture events configuration. Default: current platform. (optional)
(start-screencast)
(start-screencast {:as params
:keys [format quality max-width max-height every-nth-frame]})
(start-screencast connection
{:as params
:keys [format quality max-width max-height every-nth-frame]})
Starts sending each frame using the screencastFrame
event.
Parameters map keys:
Key | Description |
---|---|
:format | Image compression format. (optional) |
:quality | Compression quality from range [0..100]. (optional) |
:max-width | Maximum screenshot width. (optional) |
:max-height | Maximum screenshot height. (optional) |
:every-nth-frame | Send every n-th frame. (optional) |
Starts sending each frame using the `screencastFrame` event. Parameters map keys: Key | Description -----------------|------------ :format | Image compression format. (optional) :quality | Compression quality from range [0..100]. (optional) :max-width | Maximum screenshot width. (optional) :max-height | Maximum screenshot height. (optional) :every-nth-frame | Send every n-th frame. (optional)
(stop-loading)
(stop-loading {:as params :keys []})
(stop-loading connection {:as params :keys []})
Force the page stop all navigations and pending resource fetches.
Force the page stop all navigations and pending resource fetches.
(stop-screencast)
(stop-screencast {:as params :keys []})
(stop-screencast connection {:as params :keys []})
Stops sending each frame in the screencastFrame
.
Stops sending each frame in the `screencastFrame`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close