Sha256: f2e673f606683e2b88b7a7c74c51bcfdaea320930159db4de174e82fa6ecbfc4

Contents?: true

Size: 540 Bytes

Versions: 46

Compression:

Stored size: 540 Bytes

Contents

"use strict";
const { firstChildWithLocalName } = require("./traversal");
const { HTML_NS } = require("./namespaces");

// https://html.spec.whatwg.org/multipage/interactive-elements.html#summary-for-its-parent-details
exports.isSummaryForParentDetails = summaryElement => {
  const parent = summaryElement.parentNode;
  if (parent === null) {
    return false;
  }
  if (parent._localName !== "details" || parent._namespaceURI !== HTML_NS) {
    return false;
  }
  return firstChildWithLocalName(parent, "summary") === summaryElement;
};

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.12 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.11 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.10 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.9 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.8 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js
clapton-0.0.7 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/details.js