Sha256: 3b1e6dfe235e9cd2ee0509a1fe31d77d5cb33893fc7569986b9fa465d21d7be0

Contents?: true

Size: 1.04 KB

Versions: 75

Compression:

Stored size: 1.04 KB

Contents

import './matches.mjs';

// @ts-nocheck

(function(undefined) {

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

  if (detect) return

  // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js
  Element.prototype.closest = function closest(selector) {
    var node = this;

    while (node) {
      if (node.matches(selector)) return node;
      else node = 'SVGElement' in window && node instanceof SVGElement ? node.parentNode : node.parentElement;
    }

    return null;
  };

}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
//# sourceMappingURL=vendor/polyfills/Element/prototype/closest.mjs.map

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
govuk_publishing_components-35.14.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.13.2 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.13.1 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.13.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.12.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.11.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.10.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.9.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.8.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.7.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.6.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.5.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.4.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.3.5 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs
govuk_publishing_components-35.3.4 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/closest.mjs