Sha256: 8c1d64ecf7fdbf4a00b7366f25be81ba4b998ab18bc5db1f781155f45472ac5c

Contents?: true

Size: 1.11 KB

Versions: 68

Compression:

Stored size: 1.11 KB

Contents

(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 || {});

Version data entries

68 entries across 68 versions & 1 rubygems

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