diff --git a/kayle/lib/index.ts b/kayle/lib/index.ts index b68f168..2cd2ca2 100644 --- a/kayle/lib/index.ts +++ b/kayle/lib/index.ts @@ -11,5 +11,12 @@ export { sendCDPPageConfigurationEnable, sendCDPPageConfigurationReset, } from "./utils/cdp-blocking"; -export { setLogging, Standard, type RunnerConfig, type Runner, type LifeCycleEvent, type WaitForOptions } from "./config"; +export { + setLogging, + Standard, + type RunnerConfig, + type Runner, + type LifeCycleEvent, + type WaitForOptions, +} from "./config"; export { extractLinks, innateBuilder } from "./wasm"; diff --git a/kayle/lib/runner.ts b/kayle/lib/runner.ts index 8e3199b..5e910ad 100644 --- a/kayle/lib/runner.ts +++ b/kayle/lib/runner.ts @@ -48,7 +48,7 @@ [A_5, [20, H_5]], [H_5, [20, A_5]], [A_6, [10, H_6]], - [H_6, [10, A_6]] + [H_6, [10, A_6]], ]); // root html element @@ -65,7 +65,10 @@ if (issue.element) { context = getElementContext(issue.element); selector = getElementSelector(issue.element); - if (cliped) { + if ( + cliped && + typeof issue.element.getBoundingClientRect === "function" + ) { const { x, y, width, height } = issue.element.getBoundingClientRect(); clip = { diff --git a/kayle/package.json b/kayle/package.json index ae22fef..e8c306f 100644 --- a/kayle/package.json +++ b/kayle/package.json @@ -1,6 +1,6 @@ { "name": "kayle", - "version": "0.8.8", + "version": "0.8.9", "description": "Extremely fast and accurate accessibility engine built for any headless tool like playwright or puppeteer.", "main": "./build/index.js", "keywords": [