Sha256: e186d76891258932cc24320ab5ad981350f7f692cf06846f42e4cdb5020a3e7d

Contents?: true

Size: 1.42 KB

Versions: 19

Compression:

Stored size: 1.42 KB

Contents

(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
  typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
  (factory());
}(this, (function () { 'use strict';

  (function(undefined) {

    // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/detect.js
    var detect = (
      'document' in this && "matches" in document.documentElement
    );

    if (detect) return

    // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/matches/polyfill.js
    Element.prototype.matches = Element.prototype.webkitMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.mozMatchesSelector || function matches(selector) {
      var element = this;
      var elements = (element.document || element.ownerDocument).querySelectorAll(selector);
      var index = 0;

      while (elements[index] && elements[index] !== element) {
        ++index;
      }

      return !!elements[index];
    };

  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});

})));
//# sourceMappingURL=matches.js.map

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
govuk_publishing_components-35.3.3 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-35.3.2 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-35.3.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-35.3.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-35.2.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-35.1.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-35.1.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-35.0.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.14.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.13.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.12.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.11.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.10.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.10.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.9.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.9.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.8.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.8.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js
govuk_publishing_components-34.7.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js