Skip to content

Commit

Permalink
comment update on types
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Feb 6, 2024
1 parent 85944f7 commit 5f15c73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@ export interface AutocaptureConfig {
/**
* List of DOM elements to allow autocapture on
* e.g. ['a', 'button', 'form', 'input', 'select', 'textarea', 'label']
* we consider the tree of elements from the root to the target element of the click event
* so for the tree div > div > button > svg
* if the allowlist has button then we allow the capture when the button or the svg is the click target
* but not if either of the divs are detected as the click target
*/
element_allowlist?: AutocaptureCompatibleElement[]

/**
* List of CSS selectors to allow autocapture on
* e.g. ['[ph-capture]']
* we consider the tree of elements from the root to the target element of the click event
* so for the tree div > div > button > svg
* and allow list config `['[id]']`
* we will capture the click if any of the four elements has any id
*/
css_selector_allowlist?: string[]

Expand Down

0 comments on commit 5f15c73

Please sign in to comment.