Skip to content

Commit

Permalink
chore(kayle): fix clip bounding box element handling
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez committed Feb 9, 2024
1 parent 4c79036 commit cb2dbcb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
9 changes: 8 additions & 1 deletion kayle/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
7 changes: 5 additions & 2 deletions kayle/lib/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion kayle/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down

0 comments on commit cb2dbcb

Please sign in to comment.