Iterable of elements that match xpath.
Adapted from stackoverflow
Focuses an input element and makes sure the cursor is put at the end of the input
Return all frames that belong to the document (frames that belong to extensions are ignored).
The document the frames should be fetched from
Get all elements that match the given selector
`the CSS selector to choose elements with
filter to use (in thre given order) to further chose items, or [] for all
Get the nth input element on a page
the element index, can be negative to start at the end
filter to use (in thre given order) to further chose items, or [] for all
This function decides whether the height attribute contained in a ComputedStyle matters. For example, the height attribute doesn't matter for elements that have "display: inline" because their height is overriden by the height of the node they are in.
Replace the page's addEventListener with a closure containing a reference to the original addEventListener and registerEvListenerAction. Do the same with removeEventListener.
Returns whether the passed HTML input element is editable
Is the element of "substantial" size and shown on the page. The element doesn't need to be in the viewport. This is useful when you want to scroll to something, but still want to exclude tiny and useless items
Given a DOM element, returns true if you can edit it with key presses or if the element is of a type that should handle its own keypresses (e.g. role=application for google docs/sheets) TODO: work on case sensitivity consider all the possible cases
is the element within a rect and not obscured by another element?
From: https://github.com/lusakasa/saka-key/blob/9f560b3a718a9efda809dcb794de14b4e675b35a/src/modes/hints/client/findHints.js#L97 Based on https://github.com/guyht/vimari/blob/master/vimari.safariextension/linkHints.js
Dispatch a mouse event to the target element based on cVim's implementation
Adds or removes an element from the hintworthy_js_elems array of the current tab.
@param {EventTarget} elem The element add/removeEventListener is called on @param {boolean} add true when called from addEventListener, false from removeEventListener @param {string} event The event name given to add/removeEventListener
This function must be security reviewed when Custom Elements land in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1406825
This function is exported to the web content window but should only be callable from our modified add/removeEventListener because we remove the reference to it before web content runs (if added afterwards a mutationobserver on the window object would probably capture a reference to this function).
Just in case web content does get a direct reference or the built-in add/removeEventListener code doesn't validate elem correctly, this function must assume that its inputs are potentially malicious.
Generated using TypeDoc
Comparison function by offsetWidth/Height, used for sorting elements by their area on the page