diff options
Diffstat (limited to 'node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js')
-rw-r--r-- | node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js b/node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js new file mode 100644 index 0000000..3a15717 --- /dev/null +++ b/node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js @@ -0,0 +1,12 @@ +"use strict"; + +const enumerationValues = new Set(["open", "closed"]); +exports.enumerationValues = enumerationValues; + +exports.convert = function convert(value, { context = "The provided value" } = {}) { + const string = `${value}`; + if (!enumerationValues.has(string)) { + throw new TypeError(`${context} '${string}' is not a valid enumeration value for ShadowRootMode`); + } + return string; +}; |