wp/wp-includes/js/dist/vendor/wp-polyfill-inert.js
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    13    * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
    13    * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
    14    */
    14    */
    15 
    15 
    16   (function () {
    16   (function () {
    17     // Return early if we're not running inside of the browser.
    17     // Return early if we're not running inside of the browser.
    18     if (typeof window === 'undefined') {
    18     if (typeof window === 'undefined' || typeof Element === 'undefined') {
    19       return;
    19       return;
    20     }
    20     }
    21 
    21 
    22     // Convenience function for converting NodeLists.
    22     // Convenience function for converting NodeLists.
    23     /** @type {typeof Array.prototype.slice} */
    23     /** @type {typeof Array.prototype.slice} */
    28      * @type {typeof Element.prototype.matches}
    28      * @type {typeof Element.prototype.matches}
    29      */
    29      */
    30     var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
    30     var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
    31 
    31 
    32     /** @type {string} */
    32     /** @type {string} */
    33     var _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'details', 'summary', 'iframe', 'object', 'embed', '[contenteditable]'].join(',');
    33     var _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'details', 'summary', 'iframe', 'object', 'embed', 'video', '[contenteditable]'].join(',');
    34 
    34 
    35     /**
    35     /**
    36      * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`
    36      * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`
    37      * attribute.
    37      * attribute.
    38      *
    38      *