Sha256: 245f336ced8ca88346afb104f59df55f7c75a68df4d2eefecf819f6e413c1a8b

Contents?: true

Size: 1.59 KB

Versions: 51

Compression:

Stored size: 1.59 KB

Contents

"use strict";

// https://svgwg.org/svg2-draft/types.html#TermDetach
function detach(value) {
  if (typeof value === "string") {
    return;
  }

  throw new TypeError(`jsdom internal error: detaching object of wrong type ${value}`);
}
exports.detach = detach;

// https://svgwg.org/svg2-draft/types.html#TermAttach
// listObject corresponds to the parameter taken by the algorithm in the spec, but is currently unused because only
// DOMString type is supported by jsdom (and this function) right now.
// eslint-disable-next-line no-unused-vars
function attach(value, listObject) {
  if (typeof value === "string") {
    return;
  }

  throw new TypeError(`jsdom internal error: attaching object of wrong type ${value}`);
}
exports.attach = attach;

// https://svgwg.org/svg2-draft/types.html#TermReserialize for DOMString.
function reserializeSpaceSeparatedTokens(elements) {
  return elements.join(" ");
}
exports.reserializeSpaceSeparatedTokens = reserializeSpaceSeparatedTokens;

// Used for systemLanguage attribute, whose value is a set of comma-separated tokens:
// https://svgwg.org/svg2-draft/struct.html#SystemLanguageAttribute
// SVG 2 spec (https://svgwg.org/svg2-draft/types.html#TermReserialize) says any SVGStringList should reserialize the
// same way, as space-separated tokens, but doing so for systemLanguage is illogical and contradicts the Firefox
// behavior.
// I cannot find a description of reserialization of SVGStringList in the SVG 1.1 spec.
function reserializeCommaSeparatedTokens(elements) {
  return elements.join(", ");
}
exports.reserializeCommaSeparatedTokens = reserializeCommaSeparatedTokens;

Version data entries

51 entries across 48 versions & 3 rubygems

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