[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 1523 lines (51 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
__webpack_require__(moduleId) X-Ref |
No description |
getDefault() X-Ref |
No description |
getModuleExports() X-Ref |
No description |
isVisible(element) X-Ref |
Returns true if the specified element is visible (i.e. neither display: none nor visibility: hidden). param: {Element} element DOM element to test. return: {boolean} Whether element is visible. |
skipFocus(element) X-Ref |
Returns true if the specified element should be skipped from focusable elements. For now it rather specific for `iframes` and if tabindex attribute is set to -1. param: {Element} element DOM element to test. return: {boolean} Whether element should be skipped from focusable elements. |
isValidFocusableArea(element) X-Ref |
Returns true if the specified area element is a valid focusable element, or false otherwise. Area is only focusable if within a map where a named map referenced by an image somewhere in the document. param: {Element} element DOM area element to test. return: {boolean} Whether area element is valid for focus. |
find(context) X-Ref |
Returns all focusable elements within a given context. param: {Element} context Element in which to search. return: {Element[]} Focusable elements. |
getTabIndex(element) X-Ref |
Returns the tab index of the given element. In contrast with the tabIndex property, this normalizes the default (0) to avoid browser inconsistencies, operating under the assumption that this function is only ever called with a focusable node. param: {Element} element Element from which to retrieve. return: {?number} Tab index of element (default 0). |
isTabbableIndex(element) X-Ref |
Returns true if the specified element is tabbable, or false otherwise. param: {Element} element Element to test. return: {boolean} Whether element is tabbable. |
createStatefulCollapseRadioGroup() X-Ref |
Returns a stateful reducer function which constructs a filtered array of tabbable elements, where at most one radio input is selected for a given name, giving priority to checked input, falling back to the first encountered. return: {Function} Radio group collapse reducer. |
mapElementToObjectTabbable(element, index) X-Ref |
An array map callback, returning an object with the element value and its array index location as properties. This is used to emulate a proper stable sort where equal tabIndex should be left in order of their occurrence in the document. param: {Element} element Element. param: {number} index Array index of element. return: {Object} Mapped object with element, index. |
mapObjectTabbableToElement(object) X-Ref |
An array map callback, returning an element of the given mapped object's element value. param: {Object} object Mapped object with index. return: {Element} Mapped object element. |
compareObjectTabbables(a, b) X-Ref |
A sort comparator function used in comparing two objects of mapped elements. param: {Object} a First object to compare. param: {Object} b Second object to compare. return: {number} Comparator result. |
filterTabbable(focusables) X-Ref |
Givin focusable elements, filters out tabbable element. param: {Array} focusables Focusable elements to filter. return: {Array} Tabbable elements. |
tabbable_find(context) X-Ref |
No description |
findPrevious(element) X-Ref |
Given a focusable element, find the preceding tabbable element. param: {Element} element The focusable element before which to look. Defaults |
findNext(element) X-Ref |
Given a focusable element, find the next tabbable element. param: {Element} element The focusable element after which to look. Defaults |
ownKeys(object, enumerableOnly) X-Ref |
No description |
_objectSpread(target) X-Ref |
No description |
getPhrasingContentSchema(context) X-Ref |
Get schema of possible paths for phrasing content. param: {string} context Set to "paste" to exclude invisible elements and return: {Object} Schema. |
isPhrasingContent(node) X-Ref |
Find out whether or not the given node is phrasing content. param: {Element} node The node to test. return: {boolean} True if phrasing content, false if not. |
isTextContent(node) X-Ref |
No description |
getComputedStyle(node) X-Ref |
No description |
isSelectionForward(selection) X-Ref |
Returns true if the given selection object is in the forward direction, or false otherwise. param: {Selection} selection Selection object to check. return: {boolean} Whether the selection is forward. |
isEdge(container, isReverse, onlyVertical) X-Ref |
Check whether the selection is at the edge of the container. Checks for horizontal position by default. Set `onlyVertical` to true to check only vertically. param: {Element} container Focusable element. param: {boolean} isReverse Set to true to check left, false to check right. param: {boolean} onlyVertical Set to true to check only vertical position. return: {boolean} True if at the edge, false if not. |
isHorizontalEdge(container, isReverse) X-Ref |
Check whether the selection is horizontally at the edge of the container. param: {Element} container Focusable element. param: {boolean} isReverse Set to true to check left, false for right. return: {boolean} True if at the horizontal edge, false if not. |
isVerticalEdge(container, isReverse) X-Ref |
Check whether the selection is vertically at the edge of the container. param: {Element} container Focusable element. param: {boolean} isReverse Set to true to check top, false for bottom. return: {boolean} True if at the vertical edge, false if not. |
getRectangleFromRange(range) X-Ref |
Get the rectangle of a given Range. param: {Range} range The range. return: {DOMRect} The rectangle. |
computeCaretRect(win) X-Ref |
Get the rectangle for the selection in a container. param: {Window} win The window of the selection. return: {?DOMRect} The rectangle. |
placeCaretAtHorizontalEdge(container, isReverse) X-Ref |
Places the caret at start or end of a given element. param: {Element} container Focusable element. param: {boolean} isReverse True for end, false for start. |
caretRangeFromPoint(doc, x, y) X-Ref |
Polyfill. Get a collapsed range for a given point. param: {Document} doc The document of the range. param: {number} x Horizontal position within the current viewport. param: {number} y Vertical position within the current viewport. return: {?Range} The best range for the given point. |
hiddenCaretRangeFromPoint(doc, x, y, container) X-Ref |
Get a collapsed range for a given point. Gives the container a temporary high z-index (above any UI). This is preferred over getting the UI nodes and set styles there. param: {Document} doc The document of the range. param: {number} x Horizontal position within the current viewport. param: {number} y Vertical position within the current viewport. param: {Element} container Container in which the range is expected to be found. return: {?Range} The best range for the given point. |
placeCaretAtVerticalEdge(container, isReverse, rect) X-Ref |
Places the caret at the top or bottom of a given element. param: {Element} container Focusable element. param: {boolean} isReverse True for bottom, false for top. param: {DOMRect} [rect] The rectangle to position the caret with. param: {boolean} [mayUseScroll=true] True to allow scrolling, false to disallow. |
isTextField(element) X-Ref |
Check whether the given element is a text field, where text field is defined by the ability to select within the input, or that it is contenteditable. See: https://html.spec.whatwg.org/#textFieldSelection param: {HTMLElement} element The HTML element. return: {boolean} True if the element is an text field, false if not. |
isNumberInput(element) X-Ref |
Check whether the given element is an input field of type number and has a valueAsNumber param: {HTMLElement} element The HTML element. return: {boolean} True if the element is input and holds a number. |
documentHasTextSelection(doc) X-Ref |
Check whether the current document has selected text. This applies to ranges of text in the document, and not selection inside <input> and <textarea> elements. See: https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection#Related_objects. param: {Document} doc The document to check. return: {boolean} True if there is selection, false if not. |
inputFieldHasUncollapsedSelection(element) X-Ref |
Check whether the given element, assumed an input field or textarea, contains a (uncollapsed) selection of text. Note: this is perhaps an abuse of the term "selection", since these elements manage selection differently and aren't covered by Selection#collapsed. See: https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection#Related_objects. param: {HTMLElement} element The HTML element. return: {boolean} Whether the input/textareaa element has some "selection". |
documentHasUncollapsedSelection(doc) X-Ref |
Check whether the current document has any sort of selection. This includes ranges of text across elements and any selection inside <input> and <textarea> elements. param: {Document} doc The document to check. return: {boolean} Whether there is any sort of "selection" in the document. |
documentHasSelection(doc) X-Ref |
Check whether the current document has a selection. This checks for both focus in an input field and general text selection. param: {Document} doc The document to check. return: {boolean} True if there is selection, false if not. |
isEntirelySelected(element) X-Ref |
Check whether the contents of the element have been entirely selected. Returns true if there is no possibility of selection. param: {Element} element The element to check. return: {boolean} True if entirely selected, false if not. |
getScrollContainer(node) X-Ref |
Given a DOM node, finds the closest scrollable container node. param: {Element} node Node from which to start. return: {?Element} Scrollable container node, if found. |
getOffsetParent(node) X-Ref |
Returns the closest positioned element, or null under any of the conditions of the offsetParent specification. Unlike offsetParent, this function is not limited to HTMLElement and accepts any Node (e.g. Node.TEXT_NODE). param: {Node} node Node from which to find offset parent. return: {?Node} Offset parent. |
replace(processedNode, newNode) X-Ref |
Given two DOM nodes, replaces the former with the latter in the DOM. param: {Element} processedNode Node to be removed. param: {Element} newNode Node to be inserted in its place. return: {void} |
remove(node) X-Ref |
Given a DOM node, removes it from the DOM. param: {Element} node Node to be removed. return: {void} |
insertAfter(newNode, referenceNode) X-Ref |
Given two DOM nodes, inserts the former in the DOM as the next sibling of the latter. param: {Element} newNode Node to be inserted. param: {Element} referenceNode Node after which to perform the insertion. return: {void} |
unwrap(node) X-Ref |
Unwrap the given node. This means any child nodes are moved to the parent. param: {Node} node The node to unwrap. return: {void} |
replaceTag(node, tagName) X-Ref |
Replaces the given node with a new node with the given tag name. param: {Element} node The node to replace param: {string} tagName The new tag name. return: {Element} The new node. |
wrap(newNode, referenceNode) X-Ref |
Wraps the given node with a new node with the given tag name. param: {Element} newNode The node to insert. param: {Element} referenceNode The node to wrap. |
__unstableStripHTML(html) X-Ref |
Removes any HTML tags from the provided string. param: {string} html The string containing html. return: {string} The text content with any html removed. |
cleanNodeList(nodeList, doc, schema, inline) X-Ref |
Given a schema, unwraps or removes nodes, attributes and classes on a node list. param: {NodeList} nodeList The nodeList to filter. param: {Document} doc The document of the nodeList. param: {Object} schema An array of functions that can mutate with the provided node. param: {Object} inline Whether to clean for inline mode. |
isEmpty(element) X-Ref |
Recursively checks if an element is empty. An element is not empty if it contains text or contains elements with attributes such as images. param: {Element} element The element to check. return: {boolean} Wether or not the element is empty. |
removeInvalidHTML(HTML, schema, inline) X-Ref |
Given a schema, unwraps or removes nodes, attributes and classes on HTML. param: {string} HTML The HTML to clean up. param: {Object} schema Schema for the HTML. param: {Object} inline Whether to clean for inline mode. return: {string} The cleaned up HTML. |
_defineProperty(obj, key, value) X-Ref |
No description |
Generated : Mon Jan 18 08:20:02 2021 | Cross-referenced by PHPXref |