Sha256: 020a65918319ea4490937445542827f12ac83b676056f6a4895faf4240ae4ded

Contents?: true

Size: 1.01 KB

Versions: 75

Compression:

Stored size: 1.01 KB

Contents

{"version":3,"file":"closest-attribute-value.mjs","sources":["../../../src/govuk/common/closest-attribute-value.mjs"],"sourcesContent":["import '../vendor/polyfills/Element/prototype/closest.mjs'\n\n/**\n * Returns the value of the given attribute closest to the given element (including itself)\n *\n * @deprecated Will be made private in v5.0\n * @param {Element} $element - The element to start walking the DOM tree up\n * @param {string} attributeName - The name of the attribute\n * @returns {string | null} Attribute value\n */\nexport function closestAttributeValue ($element, attributeName) {\n  var $closestElementWithAttribute = $element.closest('[' + attributeName + ']')\n  return $closestElementWithAttribute\n    ? $closestElementWithAttribute.getAttribute(attributeName)\n    : null\n}\n"],"names":[],"mappings":";;AAEA;;;;;;;;AAQA,AAAO,SAAS,qBAAqB,EAAE,QAAQ,EAAE,aAAa,EAAE;EAC9D,IAAI,4BAA4B,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,GAAG,aAAa,GAAG,GAAG,EAAC;EAC9E,OAAO,4BAA4B;MAC/B,4BAA4B,CAAC,YAAY,CAAC,aAAa,CAAC;MACxD,IAAI;CACT;;;;"}

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
govuk_publishing_components-39.2.5 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-39.2.4 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-39.2.3 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-39.2.2 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-39.2.1 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-39.2.0 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-39.1.0 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-39.0.0 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-38.4.2 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-38.1.1 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-38.1.0 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-38.0.1 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-38.0.0 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-37.10.0 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-37.9.1 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-37.9.0 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-37.8.1 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-37.8.0 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-37.7.1 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map
govuk_publishing_components-37.7.0 node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs.map