Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/chibiScript/functions/domFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,17 @@ export default {
* Checks if the selected element is currently visible
* @input Element - DOM element
* @returns Boolean indicating if the element is visible
* @options Optional settings for visibility check. Defaults to { visibilityProperty: true, opacityProperty: true }.
* @example
* $c.querySelector('#player').checkVisibility()
*/
checkVisibility: (ctx: ChibiCtx, input: Element) => {
return input.checkVisibility({ visibilityProperty: true, opacityProperty: true });
* $c.querySelector('#player').checkVisibility({ opacityProperty: false })
*/
checkVisibility: (
ctx: ChibiCtx,
input: Element,
options: CheckVisibilityOptions = { visibilityProperty: true, opacityProperty: true },
) => {
return input.checkVisibility(options);
},

/**
Expand Down