UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

38 lines • 1.51 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../core/resource.mjs"; import { path } from "../../internal/utils/path.mjs"; export var BaseAccessibilityTree = /* @__PURE__ */ (() => { class BaseAccessibilityTree extends APIResource { /** * Returns the page's accessibility tree. Use `interestingOnly` to only return * semantically meaningful nodes; use `root` to scope the tree to a * CSS-selector-anchored subtree. Control page loading with `gotoOptions` and * `waitFor*` options. * * @example * ```ts * const accessibilityTree = * await client.browserRendering.accessibilityTree.create({ * account_id: 'account_id', * url: 'https://www.example.com/', * }); * ``` */ create(params, options) { const { account_id, cacheTTL, ...body } = params; return this._client.post(path `/accounts/${account_id}/browser-rendering/accessibilityTree`, { query: { cacheTTL }, body, ...options, })._thenUnwrap((obj) => obj.result); } } BaseAccessibilityTree._key = Object.freeze([ 'browserRendering', 'accessibilityTree', ]); return BaseAccessibilityTree; })(); export class AccessibilityTree extends BaseAccessibilityTree { } //# sourceMappingURL=accessibility-tree.mjs.map