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.6 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
clapton-0.0.5 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
clapton-0.0.4 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
clapton-0.0.3 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
clapton-0.0.2 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
clapton-0.0.1 lib/clapton/javascripts/node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.72.2 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.72.1 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.72.0 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.71.0 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.70.2 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.70.1 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.70.0 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.69.0 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.68.2 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.68.1 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.68.0 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.67.1 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.67.0 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js
appmap-0.66.2 ./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js