mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 12:00:03 +02:00
use terser and clean-css directly
create a sourcemap as well by default
This commit is contained in:
48
node_modules/jsdom/Changelog.md
generated
vendored
48
node_modules/jsdom/Changelog.md
generated
vendored
@@ -6,6 +6,7 @@
|
||||
* Prefer referring to methods and properties via `someInstance.prop`, instead of `ClassName.prototype.prop`. (Never use `ClassName.prop` except for statics.)
|
||||
* Refer to attributes via `attr=""`.
|
||||
* Refer to elements via `<element>`.
|
||||
* Refer to events via `eventname`.
|
||||
* Never use the IDL terms "interface", "attribute", or "operation".
|
||||
* URL schemes are in `code`, e.g. `data:`.
|
||||
* Except in the headings, all version numbers get a "v" prefix, e.g. v12.2.0.
|
||||
@@ -22,6 +23,23 @@ Other guidelines:
|
||||
* Roughly order changes within those groupings by impact.
|
||||
-->
|
||||
|
||||
## 14.1.0
|
||||
|
||||
* Added activation behavior for `<a>` and `<area>` elements whose `href=""` points to a `javascript:` URL or fragment.
|
||||
* Added the `<datalist>` element's `options` property.
|
||||
* Added the `<input>` element's `list` property.
|
||||
* Added `PageTransitionEvent`, and the firing of `pageshow` events during loading.
|
||||
* Exposed the `External` class as a property of `window`.
|
||||
* Fixed HTML fragment parsing (via `innerHTML` and `outerHTML`) to be spec-compliant. (pmdartus)
|
||||
* Fixed HTML serialization (e.g. via `innerHTML`) breaking after setting certain properties to non-string values.
|
||||
* Fixed how disabling an element would cause its activation behavior to forever be null, even if it were re-enabled.
|
||||
* Fixed all access to attributes to ignore attributes with namespaces, per the spec.
|
||||
* Fixed `<style>`s to no longer apply to documents without a browsing context. This includes fixing a crash that would occur with such styles if they had an `@import` rule.
|
||||
* Fixed `<option>`'s `label` and `value` properties to return correct values in various edge cases.
|
||||
* Fixed the `load` event during document loading to target the `Document`, not the `Window`.
|
||||
* Fixed the `pretendToBeVisual` option to propagate to child subframes, as well as the main `Window`. (pyrho)
|
||||
* Updated the minimum [`nwsapi`](https://www.npmjs.com/package/nwsapi) version from v2.1.1 to v2.1.3, bringing along a few fixes in our selector engine.
|
||||
|
||||
## 14.0.0
|
||||
|
||||
Breaking changes:
|
||||
@@ -41,7 +59,7 @@ Other changes:
|
||||
* Added support for XML documents loaded in frames and iframes; previously this would error.
|
||||
* Added the `<progress>` element's `value`, `max`, and `position` properties.
|
||||
* Added `navigator.plugins` and `navigator.mimeTypes`. (But, they are always empty.)
|
||||
* Fixed `<summary>` elements respond to click events by toggling their parent `<details>`.
|
||||
* Fixed `<summary>` elements respond to `click` events by toggling their parent `<details>`.
|
||||
* Fixed `<summary>` elements to be focusable.
|
||||
* Fixed XML document DOCTYPE parsing to preserve any custom name values.
|
||||
* Fixed XML documents to default to UTF-8, not windows-1252 like HTML documents do.
|
||||
@@ -54,7 +72,7 @@ Other changes:
|
||||
## 13.1.0
|
||||
|
||||
* Added `el.insertAdjacentElement()` and `el.insertAdjacentText()`.
|
||||
* Added the firing of a cancelable `"reset"` event to `form.reset()`. (epfremmer)
|
||||
* Added the firing of a cancelable `reset` event to `form.reset()`. (epfremmer)
|
||||
* Added the `type`, `value`, and `defaultValue` properties to `<output>` elements, including their form reset behavior. (epfremmer)
|
||||
* Added the `outputEl.htmlFor` property.
|
||||
* Fixed the performance of parsing large text nodes, particularly noticeable for large inline `<style>` or `<script>` elements. This regressed in v11.6.0. To learn more, see [V8 issue #6730](https://bugs.chromium.org/p/v8/issues/detail?id=6730#c4).
|
||||
@@ -62,11 +80,11 @@ Other changes:
|
||||
* Fixed `node.isConnected` to not always return false for nodes inside a shadow tree. (pmdartus)
|
||||
* Fixed `<button type="reset">` and `<input type="reset">` elements to actually perform a form reset when clicked, instead of doing nothing. (epfremmer)
|
||||
* Fixed `el.setCustomValidity()` for `<output>` and `<fieldset>`.
|
||||
* Fixed activation behavior when dispatching bubbling click events, so that for example calling `el.click()` on the child of a submit button element will submit the form.
|
||||
* Fixed activation behavior when dispatching bubbling `click` events, so that for example calling `el.click()` on the child of a submit button element will submit the form.
|
||||
* Fixed our XML parsing code to ignore text outside the root element, instead of treating it as an error. (lddubeau)
|
||||
* Fixed XML serialization when elements had an unknown prefix.
|
||||
* Fixed radio button group name matching to be case-sensitive, per [a spec update](https://github.com/whatwg/html/commit/6acdb2122298d2bb7bb839c0a61b4e1f9b0f9bc9).
|
||||
* Fixed `"focus"`/`"blur"` events to be composed.
|
||||
* Fixed `focus`/`blur` events to be composed.
|
||||
* Fixed `mediaElement.duration` to default to `NaN`.
|
||||
* Fixed `olEl.start` to default to `1`.
|
||||
* Fixed using `XMLHttpRequest` against non-existant `file:` URLs to treat that as a network error, instead of crashing. (pascalbayer) Note that in the future we may completely disable `XMLHttpRequest` usage against `file:` URLs to follow the browser security model.
|
||||
@@ -135,7 +153,7 @@ Other changes:
|
||||
|
||||
* Added `window.localStorage`, `window.sessionStorage`, and `StorageEvent` support. These are currently only stored in-memory; file an issue if you need persistent (on-disk) storage capability so we can discuss adding that. This feature includes the new `storageQuota` option for controlling how much can be stored.
|
||||
* Added `element.closest()`. (caub)
|
||||
* Changed `"hashchange"` and `"popstate"` events to no longer bubble, per a specification update.
|
||||
* Changed `hashchange` and `popstate` events to no longer bubble, per a specification update.
|
||||
* Fixed the old API in Node.js v10 to not throw, when given input that is not a valid file path (such as a typical HTML string).
|
||||
* Upgraded `cssstyle` to v1.0.0, bringing along various fixes to our CSS parser and object model. (eddies)
|
||||
* Upgraded `nwsapi` to v2.0.7, bringing along various fixes to our selector engine.
|
||||
@@ -176,14 +194,14 @@ Other changes:
|
||||
* Added `FileReader`'s `readAsBinaryString()` method, as it has been added back to the specification.
|
||||
* Fixed event handlers to be own properties of each `Window`, instead of on `Window.prototype`. (Fetz)
|
||||
* Fixed an exception that would sometimes get raised when removing an `<img>` element's `src=""` attribute. (atsikov)
|
||||
* Fixed `"abort"` events on `AbortSignal`s to have their `isTrusted` set to true.
|
||||
* Fixed `abort` events on `AbortSignal`s to have their `isTrusted` set to true.
|
||||
* Fixed some argument conversions in `XMLHttpRequest`'s `open()` method.
|
||||
* Improved MIME type and `data:` URL parsing throughout jsdom, by using the new [`whatwg-mimetype`](https://www.npmjs.com/package/whatwg-mimetype) and [`data-urls`](https://www.npmjs.com/package/data-urls) packages.
|
||||
* Removed some unnecessary `.webidl` files that were included in the npm package.
|
||||
|
||||
## 11.6.2
|
||||
|
||||
* Fixed another regression (since v11.6.0) in `<style>` elements, where they would omit a series of parsing `"jsdomError"`s for any style sheet text containing spaces.
|
||||
* Fixed another regression (since v11.6.0) in `<style>` elements, where they would omit a series of parsing `jsdomError` events for any style sheet text containing spaces.
|
||||
* Generally improved the spec-conformance of when `<style>` and `<script>` elements are evaluated; for example, `<script>` elements inserted by `innerHTML` are no longer evaluated.
|
||||
|
||||
## 11.6.1
|
||||
@@ -191,7 +209,7 @@ Other changes:
|
||||
* Fixed one regression (since v11.6.0) in `<style>` elements, where their `sheet` property would sometimes be `null` when it should not be.
|
||||
* Fixed a case where a `<style>` element's `sheet` property would be left as a `CSSStyleSheet` despite it not being in the document.
|
||||
|
||||
Another regression remains where we are emitting spurious CSS-parsing `"jsdomError"` events; see [#2123](https://github.com/tmpvar/jsdom/issues/2123). We also discovered a large amount of preexisting brokenness around `<style>`, `<link>`, and `@import`; see [#2124](https://github.com/tmpvar/jsdom/issues/2124) for more details.
|
||||
Another regression remains where we are emitting spurious CSS-parsing `jsdomError` events; see [#2123](https://github.com/tmpvar/jsdom/issues/2123). We also discovered a large amount of preexisting brokenness around `<style>`, `<link>`, and `@import`; see [#2124](https://github.com/tmpvar/jsdom/issues/2124) for more details.
|
||||
|
||||
We'll try to fix these soon, especially the regression.
|
||||
|
||||
@@ -346,7 +364,7 @@ Other changes:
|
||||
* Changed `XMLHttpRequest` to pre-allocate a 1 MiB buffer, which it grows exponentially as needed, in order to avoid frequent buffer allocation and concatenation. (skygon)
|
||||
* Fixed a variety of properties that were meant to always return the same object, to actually do so. (Zirro)
|
||||
* Fixed inheritance of the `runScripts` and `resources` options into iframes.
|
||||
* Fixed an uncaught exception that occurred if you called `xhr.abort()` during a `"readystatechange"` event.
|
||||
* Fixed an uncaught exception that occurred if you called `xhr.abort()` during a `readystatechange` event.
|
||||
|
||||
## 10.0.0
|
||||
|
||||
@@ -360,7 +378,7 @@ Apart from the new API, the following changes were made, with breaking changes b
|
||||
* **Changed the `omitJsdomErrors` option to `omitJSDOMErrors`**, for consistency [with web platform APIs](https://w3ctag.github.io/design-principles/#casing-rules).
|
||||
* Added `document.dir`. (Zirro)
|
||||
* Updated the `<a>` and `<area>` APIs to the latest specification, and fixed a few bugs with them. (makana)
|
||||
* Fixed `<img>` elements to no longer fire `"load"` events unless their image data is actually loaded (which generally only occurs when the `canvas` package is installed).
|
||||
* Fixed `<img>` elements to no longer fire `load` events unless their image data is actually loaded (which generally only occurs when the `canvas` package is installed).
|
||||
* Fixed `XMLHttpRequest` preflights to forward approved preflight headers to the actual request. (mbroadst)
|
||||
* Fixed `htmlElement.dir` to properly restrict its values to `"ltr"`, `"rtl"`, or `"auto"`. (Zirro)
|
||||
* Fixed setting `innerHTML` to the empty string to no longer be a no-op. (Zirro)
|
||||
@@ -456,7 +474,7 @@ Apart from the new API, the following changes were made, with breaking changes b
|
||||
|
||||
## 9.4.5
|
||||
|
||||
* Fixed `"error"` events from failed resource loads going missing since v9.4.3. I really should have tested that release better.
|
||||
* Fixed `error` events from failed resource loads going missing since v9.4.3. I really should have tested that release better.
|
||||
|
||||
## 9.4.4
|
||||
|
||||
@@ -751,7 +769,7 @@ This major release has as its headlining feature a completely re-written `XMLHtt
|
||||
* Added a fully spec-compliant implementation of `window.atob` and `window.btoa`. (jeffcarp)
|
||||
* Fixed many issues with our `<canvas>` implementation:
|
||||
- With the `canvas` npm package installed, `<canvas>` elements are now properly `instanceof HTMLCanvasElement` and `instanceof HTMLElement`.
|
||||
- `<canvas>` elements now present the same uniform spec-compliant API both with and without the `canvas` npm package installed. If the package is not installed, some of the methods will cause not-implemented `"jsdomError"` events to be emitted on the virtual console.
|
||||
- `<canvas>` elements now present the same uniform spec-compliant API both with and without the `canvas` npm package installed. If the package is not installed, some of the methods will cause not-implemented `jsdomError` events to be emitted on the virtual console.
|
||||
- The `width` and `height` properties now correctly reflect the `width` and `height` attributes, and have the appropriate default values of `300` and `150`.
|
||||
- With the `canvas` npm package installed, `<canvas>` elements now generally play better with other parts of jsdom, e.g., `document.getElementById` actually works with them.
|
||||
* Introduced and upated many of our element classes, so that at least every tag name/element class pair is now correct, even if some of the classes are stubs. In particular:
|
||||
@@ -775,7 +793,7 @@ This major release has as its headlining feature a completely re-written `XMLHtt
|
||||
* Made `virtualConsole.sendTo(console)` forward `"jsdomError"`s to `console` by calling `console.error`. This can be turned off by doing `virtualConsole.sendTo(console, { omitJsdomErrors: true })`.
|
||||
* Fixed errors when trying to parse invalid doctype declarations, like `<!DOCTYPE>`.
|
||||
* Fixed spurious `"jsdomError"`s that were emitted after calling `window.close()`.
|
||||
* Fixed the `"DOMSubtreeModified"` event to fire in more cases. Note that our mutation events implementation remains incomplete, and will eventually be removed (in a major release) once we implement mutation observers. (selam)
|
||||
* Fixed the `DOMSubtreeModified` event to fire in more cases. Note that our mutation events implementation remains incomplete, and will eventually be removed (in a major release) once we implement mutation observers. (selam)
|
||||
|
||||
## 6.1.0
|
||||
|
||||
@@ -812,7 +830,7 @@ This release also welcomes [long-time contributer](https://github.com/tmpvar/jsd
|
||||
* Added the `XMLHttpRequest.prototype.response` getter.
|
||||
* Fixed `StyleSheetList.prototype.item` to actually work. (chad3814)
|
||||
* Fixed the browser `vm` shim to properly add the built-in global properties (`Object`, `Array`, etc.) to the sandbox. If you were running jsdom inside a web worker and most of your scripts were broken, this should fix that.
|
||||
* Fixed the `"hashchange"` event to correctly fire `HashChangeEvent` instances, with correct properties `newURL` and `oldURL` (instead of the incorrect `newUrl` and `oldUrl` used previously).
|
||||
* Fixed the `hashchange` event to correctly fire `HashChangeEvent` instances, with correct properties `newURL` and `oldURL` (instead of the incorrect `newUrl` and `oldUrl` used previously).
|
||||
* Removed usage of the setimmediate library, as it required `eval` and thus did not work in CSP scenarios.
|
||||
|
||||
Finally, if you're a loyal jsdom fan whose made it this far into the changelog, I'd urge you to come join us in [#1139](https://github.com/tmpvar/jsdom/issues/1139), where we are brainstorming a modernized jsdom API that could get rid of many of the warts in the current one.
|
||||
@@ -1347,7 +1365,7 @@ This release owes a special thanks to [@Sebmaster](https://github.com/Sebmaster)
|
||||
## 0.6.4
|
||||
|
||||
* Fix: CSS selectors which contain commas inside quotes are no longer misinterpreted. (chad3814)
|
||||
* Add: `<img>` elements now fire `"load"` events when their `src` attributes are changed. (kapouer)
|
||||
* Add: `<img>` elements now fire `load` events when their `src` attributes are changed. (kapouer)
|
||||
|
||||
## 0.6.3
|
||||
|
||||
|
8
node_modules/jsdom/README.md
generated
vendored
8
node_modules/jsdom/README.md
generated
vendored
@@ -444,7 +444,7 @@ If you want to be sure to shut down a jsdom window, use `window.close()`, which
|
||||
|
||||
jsdom has some support for being run inside a web browser, using [browserify](https://browserify.org/). That is, inside a web browser, you can use a browserified jsdom to create an entirely self-contained set of plain JavaScript objects which look and act much like the browser's existing DOM objects, while being entirely independent of them. "Virtual DOM", indeed!
|
||||
|
||||
jsdom's primary target is still Node.js, and so we use language features that are only present in recent Node.js versions (namely, Node.js v6+). Thus, older browsers will likely not work. (Even transpilation will not help much: we plan to use `Proxy`s extensively throughout the course of jsdom v10.x.)
|
||||
jsdom's primary target is still Node.js, and so we use language features that are only present in recent Node.js versions (namely, Node.js v8+). Thus, older browsers will likely not work. (Even transpilation will not help: we use `Proxy`s extensively throughout the jsdom codebase.)
|
||||
|
||||
Notably, jsdom works well inside a web worker. The original contributor, [@lawnsea](https://github.com/lawnsea/), who made this possible, has [published a paper](https://pdfs.semanticscholar.org/47f0/6bb6607a975500a30e9e52d7c9fbc0034e27.pdf) about his project which uses this capability.
|
||||
|
||||
@@ -483,7 +483,7 @@ requirejs(["entry-module"], () => {
|
||||
|
||||
If you do not control the page, you could try workarounds such as polling for the presence of a specific element.
|
||||
|
||||
For more details, see the discussion in [#640](https://github.com/tmpvar/jsdom/issues/640), especially [@matthewkastor](https://github.com/matthewkastor)'s [insightful comment](https://github.com/tmpvar/jsdom/issues/640#issuecomment-22216965).
|
||||
For more details, see the discussion in [#640](https://github.com/jsdom/jsdom/issues/640), especially [@matthewkastor](https://github.com/matthewkastor)'s [insightful comment](https://github.com/jsdom/jsdom/issues/640#issuecomment-22216965).
|
||||
|
||||
### Shared constructors and prototypes
|
||||
|
||||
@@ -512,12 +512,12 @@ Beyond just features that we haven't gotten to yet, there are two major features
|
||||
|
||||
Currently jsdom has dummy behaviors for some aspects of these features, such as sending a "not implemented" `"jsdomError"` to the virtual console for navigation, or returning zeros for many layout-related properties. Often you can work around these limitations in your code, e.g. by creating new `JSDOM` instances for each page you "navigate" to during a crawl, or using `Object.defineProperty()` to change what various layout-related getters and methods return.
|
||||
|
||||
Note that other tools in the same space, such as PhantomJS, do support these features. On the wiki, we have a more complete writeup about [jsdom vs. PhantomJS](https://github.com/tmpvar/jsdom/wiki/jsdom-vs.-PhantomJS).
|
||||
Note that other tools in the same space, such as PhantomJS, do support these features. On the wiki, we have a more complete writeup about [jsdom vs. PhantomJS](https://github.com/jsdom/jsdom/wiki/jsdom-vs.-PhantomJS).
|
||||
|
||||
## Getting help
|
||||
|
||||
If you need help with jsdom, please feel free to use any of the following venues:
|
||||
|
||||
- The [mailing list](http://groups.google.com/group/jsdom) (best for "how do I" questions)
|
||||
- The [issue tracker](https://github.com/tmpvar/jsdom/issues) (best for bug reports)
|
||||
- The [issue tracker](https://github.com/jsdom/jsdom/issues) (best for bug reports)
|
||||
- The IRC channel: [#jsdom on freenode](irc://irc.freenode.net/jsdom)
|
||||
|
5
node_modules/jsdom/lib/api.js
generated
vendored
5
node_modules/jsdom/lib/api.js
generated
vendored
@@ -11,6 +11,7 @@ const MIMEType = require("whatwg-mimetype");
|
||||
const idlUtils = require("./jsdom/living/generated/utils.js");
|
||||
const VirtualConsole = require("./jsdom/virtual-console.js");
|
||||
const Window = require("./jsdom/browser/Window.js");
|
||||
const { parseIntoDocument } = require("./jsdom/browser/parser");
|
||||
const { fragmentSerialization } = require("./jsdom/living/domparsing/serialization.js");
|
||||
const ResourceLoader = require("./jsdom/browser/resources/resource-loader.js");
|
||||
const NoOpResourceLoader = require("./jsdom/browser/resources/no-op-resource-loader.js");
|
||||
@@ -41,8 +42,8 @@ class JSDOM {
|
||||
|
||||
options.beforeParse(this[window]._globalProxy);
|
||||
|
||||
// TODO NEWAPI: this is still pretty hacky. It's also different than jsdom.jsdom. Does it work? Can it be better?
|
||||
documentImpl._htmlToDom.appendToDocument(html, documentImpl);
|
||||
parseIntoDocument(html, documentImpl);
|
||||
|
||||
documentImpl.close();
|
||||
}
|
||||
|
||||
|
22
node_modules/jsdom/lib/jsdom/browser/Window.js
generated
vendored
22
node_modules/jsdom/lib/jsdom/browser/Window.js
generated
vendored
@@ -7,6 +7,7 @@ const notImplemented = require("./not-implemented");
|
||||
const { define, mixin } = require("../utils");
|
||||
const Element = require("../living/generated/Element");
|
||||
const EventTarget = require("../living/generated/EventTarget");
|
||||
const PageTransitionEvent = require("../living/generated/PageTransitionEvent");
|
||||
const namedPropertiesWindow = require("../living/named-properties-window");
|
||||
const cssom = require("cssom");
|
||||
const postMessage = require("../living/post-message");
|
||||
@@ -331,10 +332,10 @@ function Window(options) {
|
||||
impl.text = text;
|
||||
}
|
||||
if (value !== undefined) {
|
||||
impl.setAttribute("value", value);
|
||||
impl.setAttributeNS(null, "value", value);
|
||||
}
|
||||
if (defaultSelected) {
|
||||
impl.setAttribute("selected", "");
|
||||
impl.setAttributeNS(null, "selected", "");
|
||||
}
|
||||
impl._selectedness = selected;
|
||||
|
||||
@@ -358,10 +359,10 @@ function Window(options) {
|
||||
const impl = idlUtils.implForWrapper(img);
|
||||
|
||||
if (arguments.length > 0) {
|
||||
impl.setAttribute("width", String(arguments[0]));
|
||||
impl.setAttributeNS(null, "width", String(arguments[0]));
|
||||
}
|
||||
if (arguments.length > 1) {
|
||||
impl.setAttribute("height", String(arguments[1]));
|
||||
impl.setAttributeNS(null, "height", String(arguments[1]));
|
||||
}
|
||||
|
||||
return img;
|
||||
@@ -382,10 +383,10 @@ function Window(options) {
|
||||
function Audio(src) {
|
||||
const audio = window._document.createElement("audio");
|
||||
const impl = idlUtils.implForWrapper(audio);
|
||||
impl.setAttribute("preload", "auto");
|
||||
impl.setAttributeNS(null, "preload", "auto");
|
||||
|
||||
if (src !== undefined) {
|
||||
impl.setAttribute("src", String(src));
|
||||
impl.setAttributeNS(null, "src", String(src));
|
||||
}
|
||||
|
||||
return audio;
|
||||
@@ -632,10 +633,15 @@ function Window(options) {
|
||||
}
|
||||
|
||||
if (window.document.readyState === "complete") {
|
||||
fireAnEvent("load", window);
|
||||
fireAnEvent("load", window, undefined, {}, window.document);
|
||||
} else {
|
||||
window.document.addEventListener("load", () => {
|
||||
fireAnEvent("load", window);
|
||||
fireAnEvent("load", window, undefined, {}, window.document);
|
||||
|
||||
if (!idlUtils.implForWrapper(window._document)._pageShowingFlag) {
|
||||
idlUtils.implForWrapper(window._document)._pageShowingFlag = true;
|
||||
fireAnEvent("pageshow", window, PageTransitionEvent, { persisted: false }, window.document);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
191
node_modules/jsdom/lib/jsdom/browser/htmltodom.js
generated
vendored
191
node_modules/jsdom/lib/jsdom/browser/htmltodom.js
generated
vendored
@@ -1,191 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
const parse5 = require("parse5");
|
||||
const saxes = require("saxes");
|
||||
const attributes = require("../living/attributes");
|
||||
const DocumentType = require("../living/generated/DocumentType");
|
||||
const JSDOMParse5Adapter = require("./parse5-adapter-parsing");
|
||||
const { HTML_NS } = require("../living/helpers/namespaces");
|
||||
|
||||
module.exports = class HTMLToDOM {
|
||||
constructor(parsingMode) {
|
||||
this.parser = parsingMode === "xml" ? saxes : parse5;
|
||||
}
|
||||
|
||||
appendToNode(html, node) {
|
||||
html = String(html);
|
||||
|
||||
return this._doParse(html, true, node);
|
||||
}
|
||||
|
||||
appendToDocument(html, documentImpl) {
|
||||
html = String(html);
|
||||
|
||||
return this._doParse(html, false, documentImpl, documentImpl._parseOptions);
|
||||
}
|
||||
|
||||
_doParse(...args) {
|
||||
return this.parser === parse5 ? this._parseWithParse5(...args) : this._parseWithSaxes(...args);
|
||||
}
|
||||
|
||||
_parseWithParse5(html, isFragment, contextNode, options = {}) {
|
||||
const adapter = new JSDOMParse5Adapter(contextNode._ownerDocument || contextNode);
|
||||
options.treeAdapter = adapter;
|
||||
|
||||
if (isFragment) {
|
||||
const fragment = this.parser.parseFragment(contextNode, html, options);
|
||||
|
||||
if (contextNode._templateContents) {
|
||||
contextNode._templateContents.appendChild(fragment);
|
||||
} else {
|
||||
contextNode.appendChild(fragment);
|
||||
}
|
||||
} else {
|
||||
this.parser.parse(html, options);
|
||||
}
|
||||
|
||||
return contextNode;
|
||||
}
|
||||
|
||||
_parseWithSaxes(html, isFragment, contextNode) {
|
||||
const parserOptions = { xmlns: true };
|
||||
if (isFragment) {
|
||||
parserOptions.fragment = true;
|
||||
|
||||
parserOptions.resolvePrefix = prefix => {
|
||||
// saxes wants undefined as the return value if the prefix is not
|
||||
// defined, not null.
|
||||
return contextNode.lookupNamespaceURI(prefix) || undefined;
|
||||
};
|
||||
}
|
||||
const parser = new this.parser.SaxesParser(parserOptions);
|
||||
const openStack = [contextNode];
|
||||
const currentDocument = contextNode._ownerDocument || contextNode;
|
||||
|
||||
parser.ontext = isFragment ?
|
||||
// In a fragment, all text events produced by saxes must result in a text
|
||||
// node.
|
||||
text => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
currentDocument.createTextNode(text)
|
||||
);
|
||||
} :
|
||||
// When parsing a whole document, we must ignore those text nodes that are
|
||||
// produced outside the root element. Saxes produces events for them,
|
||||
// but DOM trees do not record text outside the root element.
|
||||
text => {
|
||||
if (openStack.length > 1) {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
currentDocument.createTextNode(text)
|
||||
);
|
||||
}
|
||||
};
|
||||
parser.oncdata = cdata => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
currentDocument.createCDATASection(cdata)
|
||||
);
|
||||
};
|
||||
parser.onopentag = tag => {
|
||||
const { local: tagLocal, uri: tagURI, prefix: tagPrefix, attributes: tagAttributes } = tag;
|
||||
const elem = currentDocument._createElementWithCorrectElementInterface(tagLocal, tagURI);
|
||||
elem._prefix = tagPrefix || null;
|
||||
elem._namespaceURI = tagURI || null;
|
||||
// We mark a script element as "parser-inserted", which prevents it from
|
||||
// being immediately executed.
|
||||
if (tagLocal === "script" && tagURI === HTML_NS) {
|
||||
elem._parserInserted = true;
|
||||
}
|
||||
|
||||
for (const key of Object.keys(tagAttributes)) {
|
||||
const { prefix, local, uri, value } = tagAttributes[key];
|
||||
attributes.setAttributeValue(
|
||||
elem, local, value, prefix === "" ? null : prefix,
|
||||
uri === "" ? null : uri
|
||||
);
|
||||
}
|
||||
|
||||
appendChild(openStack[openStack.length - 1], elem);
|
||||
openStack.push(elem);
|
||||
};
|
||||
parser.onclosetag = () => {
|
||||
const elem = openStack.pop();
|
||||
// Once a script is populated, we can execute it.
|
||||
if (elem.localName === "script" && elem.namespaceURI === HTML_NS) {
|
||||
elem._eval();
|
||||
}
|
||||
};
|
||||
parser.oncomment = comment => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
currentDocument.createComment(comment)
|
||||
);
|
||||
};
|
||||
parser.onprocessinginstruction = ({ target, body }) => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
currentDocument.createProcessingInstruction(target, body)
|
||||
);
|
||||
};
|
||||
parser.ondoctype = dt => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
parseDocType(currentDocument, `<!doctype ${dt}>`)
|
||||
);
|
||||
|
||||
const entityMatcher = /<!ENTITY ([^ ]+) "([^"]+)">/g;
|
||||
let result;
|
||||
while ((result = entityMatcher.exec(dt))) {
|
||||
const [, name, value] = result;
|
||||
if (!(name in parser.ENTITIES)) {
|
||||
parser.ENTITIES[name] = value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
parser.onerror = err => {
|
||||
throw err;
|
||||
};
|
||||
parser.write(html).close();
|
||||
}
|
||||
};
|
||||
|
||||
function appendChild(parent, child) {
|
||||
if (parent._templateContents) {
|
||||
// Template elements do not have children but instead store their content
|
||||
// in a separate hierarchy.
|
||||
parent._templateContents._insert(child, null);
|
||||
} else {
|
||||
parent._insert(child, null);
|
||||
}
|
||||
}
|
||||
|
||||
const HTML5_DOCTYPE = /<!doctype html>/i;
|
||||
const PUBLIC_DOCTYPE = /<!doctype\s+([^\s]+)\s+public\s+"([^"]+)"\s+"([^"]+)"/i;
|
||||
const SYSTEM_DOCTYPE = /<!doctype\s+([^\s]+)\s+system\s+"([^"]+)"/i;
|
||||
const CUSTOM_NAME_DOCTYPE = /<!doctype\s+([^\s>]+)/i;
|
||||
|
||||
function parseDocType(doc, html) {
|
||||
if (HTML5_DOCTYPE.test(html)) {
|
||||
return createDocumentTypeInternal(doc, "html", "", "");
|
||||
}
|
||||
|
||||
const publicPieces = PUBLIC_DOCTYPE.exec(html);
|
||||
if (publicPieces) {
|
||||
return createDocumentTypeInternal(doc, publicPieces[1], publicPieces[2], publicPieces[3]);
|
||||
}
|
||||
|
||||
const systemPieces = SYSTEM_DOCTYPE.exec(html);
|
||||
if (systemPieces) {
|
||||
return createDocumentTypeInternal(doc, systemPieces[1], "", systemPieces[2]);
|
||||
}
|
||||
|
||||
const namePiece = CUSTOM_NAME_DOCTYPE.exec(html)[1] || "html";
|
||||
return createDocumentTypeInternal(doc, namePiece, "", "");
|
||||
}
|
||||
|
||||
function createDocumentTypeInternal(ownerDocument, name, publicId, systemId) {
|
||||
return DocumentType.createImpl([], { ownerDocument, name, publicId, systemId });
|
||||
}
|
@@ -1,19 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
const DocumentType = require("../living/generated/DocumentType");
|
||||
const DocumentFragment = require("../living/generated/DocumentFragment");
|
||||
const Text = require("../living/generated/Text");
|
||||
const Comment = require("../living/generated/Comment");
|
||||
const attributes = require("../living/attributes");
|
||||
const nodeTypes = require("../living/node-type");
|
||||
const serializationAdapter = require("../living/domparsing/parse5-adapter-serialization");
|
||||
const parse5 = require("parse5");
|
||||
|
||||
const DocumentType = require("../../living/generated/DocumentType");
|
||||
const DocumentFragment = require("../../living/generated/DocumentFragment");
|
||||
const Text = require("../../living/generated/Text");
|
||||
const Comment = require("../../living/generated/Comment");
|
||||
|
||||
const attributes = require("../../living/attributes");
|
||||
const nodeTypes = require("../../living/node-type");
|
||||
|
||||
const serializationAdapter = require("../../living/domparsing/parse5-adapter-serialization");
|
||||
|
||||
const OpenElementStack = require("parse5/lib/parser/open-element-stack");
|
||||
|
||||
const OpenElementStackOriginalPop = OpenElementStack.prototype.pop;
|
||||
const OpenElementStackOriginalPush = OpenElementStack.prototype.push;
|
||||
|
||||
module.exports = class JSDOMParse5Adapter {
|
||||
class JSDOMParse5Adapter {
|
||||
constructor(documentImpl) {
|
||||
this._documentImpl = documentImpl;
|
||||
|
||||
@@ -82,11 +85,11 @@ module.exports = class JSDOMParse5Adapter {
|
||||
}
|
||||
|
||||
appendChild(parentNode, newNode) {
|
||||
parentNode.appendChild(newNode);
|
||||
parentNode._append(newNode);
|
||||
}
|
||||
|
||||
insertBefore(parentNode, newNode, referenceNode) {
|
||||
parentNode.insertBefore(newNode, referenceNode);
|
||||
parentNode._insert(newNode, referenceNode);
|
||||
}
|
||||
|
||||
setTemplateContent(templateElement, contentFragment) {
|
||||
@@ -109,7 +112,7 @@ module.exports = class JSDOMParse5Adapter {
|
||||
const ownerDocument = this._ownerDocument();
|
||||
const documentType = DocumentType.createImpl([], { name, publicId, systemId, ownerDocument });
|
||||
|
||||
document.appendChild(documentType);
|
||||
document._append(documentType);
|
||||
}
|
||||
|
||||
setDocumentMode(document, mode) {
|
||||
@@ -128,7 +131,7 @@ module.exports = class JSDOMParse5Adapter {
|
||||
} else {
|
||||
const ownerDocument = this._ownerDocument();
|
||||
const textNode = Text.createImpl([], { data: text, ownerDocument });
|
||||
parentNode.appendChild(textNode);
|
||||
parentNode._append(textNode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +142,7 @@ module.exports = class JSDOMParse5Adapter {
|
||||
} else {
|
||||
const ownerDocument = this._ownerDocument();
|
||||
const textNode = Text.createImpl([], { data: text, ownerDocument });
|
||||
parentNode.insertBefore(textNode, referenceNode);
|
||||
parentNode._append(textNode, referenceNode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +152,30 @@ module.exports = class JSDOMParse5Adapter {
|
||||
attributes.setAttributeValue(element, attr.name, attr.value, prefix, attr.namespace);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Object.assign(module.exports.prototype, serializationAdapter);
|
||||
// Assign shared adapters with serializer.
|
||||
Object.assign(JSDOMParse5Adapter.prototype, serializationAdapter);
|
||||
|
||||
function parseFragment(markup, contextElement) {
|
||||
const ownerDocument = contextElement._ownerDocument;
|
||||
|
||||
const config = Object.assign({}, ownerDocument._parseOptions, {
|
||||
treeAdapter: new JSDOMParse5Adapter(ownerDocument)
|
||||
});
|
||||
|
||||
return parse5.parseFragment(contextElement, markup, config);
|
||||
}
|
||||
|
||||
function parseIntoDocument(markup, ownerDocument) {
|
||||
const config = Object.assign({}, ownerDocument._parseOptions, {
|
||||
treeAdapter: new JSDOMParse5Adapter(ownerDocument)
|
||||
});
|
||||
|
||||
return parse5.parse(markup, config);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
parseFragment,
|
||||
parseIntoDocument
|
||||
};
|
37
node_modules/jsdom/lib/jsdom/browser/parser/index.js
generated
vendored
Normal file
37
node_modules/jsdom/lib/jsdom/browser/parser/index.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
|
||||
const xmlParser = require("./xml");
|
||||
const htmlParser = require("./html");
|
||||
|
||||
// https://w3c.github.io/DOM-Parsing/#dfn-fragment-parsing-algorithm
|
||||
function parseFragment(markup, contextElement) {
|
||||
const { _parsingMode } = contextElement._ownerDocument;
|
||||
|
||||
let parseAlgorithm;
|
||||
if (_parsingMode === "html") {
|
||||
parseAlgorithm = htmlParser.parseFragment;
|
||||
} else if (_parsingMode === "xml") {
|
||||
parseAlgorithm = xmlParser.parseFragment;
|
||||
}
|
||||
|
||||
// Note: HTML and XML fragment parsing algorithm already return a document fragments; no need to do steps 3 and 4
|
||||
return parseAlgorithm(markup, contextElement);
|
||||
}
|
||||
|
||||
function parseIntoDocument(markup, ownerDocument) {
|
||||
const { _parsingMode } = ownerDocument;
|
||||
|
||||
let parseAlgorithm;
|
||||
if (_parsingMode === "html") {
|
||||
parseAlgorithm = htmlParser.parseIntoDocument;
|
||||
} else if (_parsingMode === "xml") {
|
||||
parseAlgorithm = xmlParser.parseIntoDocument;
|
||||
}
|
||||
|
||||
return parseAlgorithm(markup, ownerDocument);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
parseFragment,
|
||||
parseIntoDocument
|
||||
};
|
192
node_modules/jsdom/lib/jsdom/browser/parser/xml.js
generated
vendored
Normal file
192
node_modules/jsdom/lib/jsdom/browser/parser/xml.js
generated
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
"use strict";
|
||||
|
||||
const { SaxesParser } = require("saxes");
|
||||
const DOMException = require("domexception");
|
||||
|
||||
const DocumentFragment = require("../../living/generated/DocumentFragment");
|
||||
const DocumentType = require("../../living/generated/DocumentType");
|
||||
const CDATASection = require("../../living/generated/CDATASection");
|
||||
const Comment = require("../../living/generated/Comment");
|
||||
const ProcessingInstruction = require("../../living/generated/ProcessingInstruction");
|
||||
const Text = require("../../living/generated/Text");
|
||||
|
||||
const attributes = require("../../living/attributes");
|
||||
const { HTML_NS } = require("../../living/helpers/namespaces");
|
||||
|
||||
const HTML5_DOCTYPE = /<!doctype html>/i;
|
||||
const PUBLIC_DOCTYPE = /<!doctype\s+([^\s]+)\s+public\s+"([^"]+)"\s+"([^"]+)"/i;
|
||||
const SYSTEM_DOCTYPE = /<!doctype\s+([^\s]+)\s+system\s+"([^"]+)"/i;
|
||||
const CUSTOM_NAME_DOCTYPE = /<!doctype\s+([^\s>]+)/i;
|
||||
|
||||
function parseDocType(doc, html) {
|
||||
if (HTML5_DOCTYPE.test(html)) {
|
||||
return createDocumentType(doc, "html", "", "");
|
||||
}
|
||||
|
||||
const publicPieces = PUBLIC_DOCTYPE.exec(html);
|
||||
if (publicPieces) {
|
||||
return createDocumentType(doc, publicPieces[1], publicPieces[2], publicPieces[3]);
|
||||
}
|
||||
|
||||
const systemPieces = SYSTEM_DOCTYPE.exec(html);
|
||||
if (systemPieces) {
|
||||
return createDocumentType(doc, systemPieces[1], "", systemPieces[2]);
|
||||
}
|
||||
|
||||
const namePiece = CUSTOM_NAME_DOCTYPE.exec(html)[1] || "html";
|
||||
return createDocumentType(doc, namePiece, "", "");
|
||||
}
|
||||
|
||||
function createDocumentType(ownerDocument, name, publicId, systemId) {
|
||||
return DocumentType.createImpl([], { ownerDocument, name, publicId, systemId });
|
||||
}
|
||||
|
||||
function appendChild(parent, child) {
|
||||
// Template elements do not have children but instead store their content in a separate hierarchy.
|
||||
if (parent.tagName === "template" && parent.namespaceURI === HTML_NS) {
|
||||
parent._templateContents._insert(child, null);
|
||||
} else {
|
||||
parent._insert(child, null);
|
||||
}
|
||||
}
|
||||
|
||||
function createParser(rootNode, ownerDocument, saxesOptions) {
|
||||
const parser = new SaxesParser(saxesOptions);
|
||||
const openStack = [rootNode];
|
||||
|
||||
parser.ontext = saxesOptions.fragment ?
|
||||
// In a fragment, all text events produced by saxes must result in a text
|
||||
// node.
|
||||
data => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
Text.createImpl([], { data, ownerDocument })
|
||||
);
|
||||
} :
|
||||
// When parsing a whole document, we must ignore those text nodes that are
|
||||
// produced outside the root element. Saxes produces events for them,
|
||||
// but DOM trees do not record text outside the root element.
|
||||
data => {
|
||||
if (openStack.length > 1) {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
Text.createImpl([], { data, ownerDocument })
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
parser.oncdata = data => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
CDATASection.createImpl([], { data, ownerDocument })
|
||||
);
|
||||
};
|
||||
|
||||
parser.onopentag = tag => {
|
||||
const { local: tagLocal, uri: tagURI, prefix: tagPrefix, attributes: tagAttributes } = tag;
|
||||
|
||||
const elem = ownerDocument._createElementWithCorrectElementInterface(tagLocal, tagURI);
|
||||
|
||||
elem._prefix = tagPrefix || null;
|
||||
elem._namespaceURI = tagURI || null;
|
||||
|
||||
// We mark a script element as "parser-inserted", which prevents it from
|
||||
// being immediately executed.
|
||||
if (tagLocal === "script" && tagURI === HTML_NS) {
|
||||
elem._parserInserted = true;
|
||||
}
|
||||
|
||||
for (const key of Object.keys(tagAttributes)) {
|
||||
const { prefix, local, uri, value } = tagAttributes[key];
|
||||
attributes.setAttributeValue(
|
||||
elem, local, value, prefix === "" ? null : prefix,
|
||||
uri === "" ? null : uri
|
||||
);
|
||||
}
|
||||
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
elem
|
||||
);
|
||||
openStack.push(elem);
|
||||
};
|
||||
|
||||
parser.onclosetag = () => {
|
||||
const elem = openStack.pop();
|
||||
// Once a script is populated, we can execute it.
|
||||
if (elem.localName === "script" && elem.namespaceURI === HTML_NS) {
|
||||
elem._eval();
|
||||
}
|
||||
};
|
||||
|
||||
parser.oncomment = data => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
Comment.createImpl([], { data, ownerDocument })
|
||||
);
|
||||
};
|
||||
|
||||
parser.onprocessinginstruction = ({ target, body }) => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
ProcessingInstruction.createImpl([], { target, data: body, ownerDocument })
|
||||
);
|
||||
};
|
||||
|
||||
parser.ondoctype = dt => {
|
||||
appendChild(
|
||||
openStack[openStack.length - 1],
|
||||
parseDocType(ownerDocument, `<!doctype ${dt}>`)
|
||||
);
|
||||
|
||||
const entityMatcher = /<!ENTITY ([^ ]+) "([^"]+)">/g;
|
||||
let result;
|
||||
while ((result = entityMatcher.exec(dt))) {
|
||||
const [, name, value] = result;
|
||||
if (!(name in parser.ENTITIES)) {
|
||||
parser.ENTITIES[name] = value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
parser.onerror = err => {
|
||||
throw new DOMException(err.message, "SyntaxError");
|
||||
};
|
||||
|
||||
return parser;
|
||||
}
|
||||
|
||||
function parseFragment(markup, contextElement) {
|
||||
const ownerDocument = contextElement._ownerDocument;
|
||||
const fragment = DocumentFragment.createImpl([], { ownerDocument });
|
||||
|
||||
// Only parseFragment needs resolvePrefix per the saxes documentation:
|
||||
// https://github.com/lddubeau/saxes#parsing-xml-fragments
|
||||
const parser = createParser(fragment, ownerDocument, {
|
||||
xmlns: true,
|
||||
fragment: true,
|
||||
resolvePrefix(prefix) {
|
||||
// saxes wants undefined as the return value if the prefix is not defined, not null.
|
||||
return contextElement.lookupNamespaceURI(prefix) || undefined;
|
||||
}
|
||||
});
|
||||
|
||||
parser.write(markup).close();
|
||||
|
||||
return fragment;
|
||||
}
|
||||
|
||||
function parseIntoDocument(markup, ownerDocument) {
|
||||
const parser = createParser(ownerDocument, ownerDocument, {
|
||||
xmlns: true
|
||||
});
|
||||
|
||||
parser.write(markup).close();
|
||||
|
||||
return ownerDocument;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
parseFragment,
|
||||
parseIntoDocument
|
||||
};
|
4
node_modules/jsdom/lib/jsdom/browser/resources/per-document-resource-loader.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/browser/resources/per-document-resource-loader.js
generated
vendored
@@ -66,9 +66,9 @@ module.exports = class PerDocumentResourceLoader {
|
||||
}
|
||||
};
|
||||
|
||||
if (element.localName === "script" && element.hasAttribute("async")) {
|
||||
if (element.localName === "script" && element.hasAttributeNS(null, "async")) {
|
||||
this._asyncQueue.push(request, onLoadWrapped, onErrorWrapped, this._queue.getLastScript());
|
||||
} else if (element.localName === "script" && element.hasAttribute("defer")) {
|
||||
} else if (element.localName === "script" && element.hasAttributeNS(null, "defer")) {
|
||||
this._deferQueue.push(request, onLoadWrapped, onErrorWrapped, false, element);
|
||||
} else {
|
||||
this._queue.push(request, onLoadWrapped, onErrorWrapped, false, element);
|
||||
|
2
node_modules/jsdom/lib/jsdom/living/attributes.js
generated
vendored
2
node_modules/jsdom/lib/jsdom/living/attributes.js
generated
vendored
@@ -8,6 +8,8 @@ const { queueAttributeMutationRecord } = require("./helpers/mutation-observers")
|
||||
// The following three are for https://dom.spec.whatwg.org/#concept-element-attribute-has. We don't just have a
|
||||
// predicate tester since removing that kind of flexibility gives us the potential for better future optimizations.
|
||||
|
||||
/* eslint-disable no-restricted-properties */
|
||||
|
||||
exports.hasAttribute = function (element, A) {
|
||||
return element._attributeList.includes(A);
|
||||
};
|
||||
|
2
node_modules/jsdom/lib/jsdom/living/attributes/NamedNodeMap-impl.js
generated
vendored
2
node_modules/jsdom/lib/jsdom/living/attributes/NamedNodeMap-impl.js
generated
vendored
@@ -46,9 +46,11 @@ exports.implementation = class NamedNodeMapImpl {
|
||||
return attributes.getAttributeByNameNS(this._element, namespace, localName);
|
||||
}
|
||||
setNamedItem(attr) {
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
return attributes.setAttribute(this._element, attr);
|
||||
}
|
||||
setNamedItemNS(attr) {
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
return attributes.setAttribute(this._element, attr);
|
||||
}
|
||||
removeNamedItem(qualifiedName) {
|
||||
|
8
node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js
generated
vendored
8
node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js
generated
vendored
@@ -1,4 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
const { parseIntoDocument } = require("../../browser/parser");
|
||||
|
||||
const Document = require("../generated/Document");
|
||||
|
||||
exports.implementation = class DOMParserImpl {
|
||||
@@ -12,7 +15,6 @@ exports.implementation = class DOMParserImpl {
|
||||
case "application/xml":
|
||||
case "application/xhtml+xml":
|
||||
case "image/svg+xml": {
|
||||
// TODO: use a strict XML parser (sax's strict mode might work?) and create parsererror elements
|
||||
try {
|
||||
return createScriptingDisabledDocument("xml", contentType, string);
|
||||
} catch (error) {
|
||||
@@ -45,8 +47,8 @@ function createScriptingDisabledDocument(parsingMode, contentType, string) {
|
||||
});
|
||||
|
||||
if (string !== undefined) {
|
||||
document._htmlToDom.appendToDocument(string, document);
|
||||
parseIntoDocument(string, document);
|
||||
}
|
||||
document.close();
|
||||
|
||||
return document;
|
||||
}
|
||||
|
20
node_modules/jsdom/lib/jsdom/living/events/PageTransitionEvent-impl.js
generated
vendored
Normal file
20
node_modules/jsdom/lib/jsdom/living/events/PageTransitionEvent-impl.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
const EventImpl = require("./Event-impl").implementation;
|
||||
|
||||
const PageTransitionEventInit = require("../generated/PageTransitionEventInit");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#pagetransitionevent
|
||||
class PageTransitionEventImpl extends EventImpl {
|
||||
initPageTransitionEvent(type, bubbles, cancelable, persisted) {
|
||||
if (this._dispatchFlag) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.initEvent(type, bubbles, cancelable);
|
||||
this.persisted = persisted;
|
||||
}
|
||||
}
|
||||
PageTransitionEventImpl.defaultInit = PageTransitionEventInit.convert(undefined);
|
||||
|
||||
exports.implementation = PageTransitionEventImpl;
|
12
node_modules/jsdom/lib/jsdom/living/generated/Element.js
generated
vendored
12
node_modules/jsdom/lib/jsdom/living/generated/Element.js
generated
vendored
@@ -876,7 +876,7 @@ class Element extends Node.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("id");
|
||||
const value = this.getAttributeNS(null, "id");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ class Element extends Node.interface {
|
||||
|
||||
V = conversions["DOMString"](V, { context: "Failed to set the 'id' property on 'Element': The provided value" });
|
||||
|
||||
this.setAttribute("id", V);
|
||||
this.setAttributeNS(null, "id", V);
|
||||
}
|
||||
|
||||
get className() {
|
||||
@@ -895,7 +895,7 @@ class Element extends Node.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("class");
|
||||
const value = this.getAttributeNS(null, "class");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -908,7 +908,7 @@ class Element extends Node.interface {
|
||||
context: "Failed to set the 'className' property on 'Element': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("class", V);
|
||||
this.setAttributeNS(null, "class", V);
|
||||
}
|
||||
|
||||
get classList() {
|
||||
@@ -934,7 +934,7 @@ class Element extends Node.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("slot");
|
||||
const value = this.getAttributeNS(null, "slot");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -945,7 +945,7 @@ class Element extends Node.interface {
|
||||
|
||||
V = conversions["DOMString"](V, { context: "Failed to set the 'slot' property on 'Element': The provided value" });
|
||||
|
||||
this.setAttribute("slot", V);
|
||||
this.setAttributeNS(null, "slot", V);
|
||||
}
|
||||
|
||||
get attributes() {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/External.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/External.js
generated
vendored
@@ -100,7 +100,9 @@ const iface = {
|
||||
return obj;
|
||||
},
|
||||
interface: External,
|
||||
expose: {}
|
||||
expose: {
|
||||
Window: { External }
|
||||
}
|
||||
}; // iface
|
||||
module.exports = iface;
|
||||
|
||||
|
40
node_modules/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js
generated
vendored
40
node_modules/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js
generated
vendored
@@ -17,7 +17,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("target");
|
||||
const value = this.getAttributeNS(null, "target");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'target' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("target", V);
|
||||
this.setAttributeNS(null, "target", V);
|
||||
}
|
||||
|
||||
get download() {
|
||||
@@ -38,7 +38,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("download");
|
||||
const value = this.getAttributeNS(null, "download");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'download' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("download", V);
|
||||
this.setAttributeNS(null, "download", V);
|
||||
}
|
||||
|
||||
get rel() {
|
||||
@@ -59,7 +59,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("rel");
|
||||
const value = this.getAttributeNS(null, "rel");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'rel' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("rel", V);
|
||||
this.setAttributeNS(null, "rel", V);
|
||||
}
|
||||
|
||||
get relList() {
|
||||
@@ -98,7 +98,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("hreflang");
|
||||
const value = this.getAttributeNS(null, "hreflang");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'hreflang' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("hreflang", V);
|
||||
this.setAttributeNS(null, "hreflang", V);
|
||||
}
|
||||
|
||||
get type() {
|
||||
@@ -119,7 +119,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
|
||||
get text() {
|
||||
@@ -160,7 +160,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("coords");
|
||||
const value = this.getAttributeNS(null, "coords");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'coords' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("coords", V);
|
||||
this.setAttributeNS(null, "coords", V);
|
||||
}
|
||||
|
||||
get charset() {
|
||||
@@ -181,7 +181,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("charset");
|
||||
const value = this.getAttributeNS(null, "charset");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'charset' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("charset", V);
|
||||
this.setAttributeNS(null, "charset", V);
|
||||
}
|
||||
|
||||
get name() {
|
||||
@@ -202,7 +202,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get rev() {
|
||||
@@ -223,7 +223,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("rev");
|
||||
const value = this.getAttributeNS(null, "rev");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'rev' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("rev", V);
|
||||
this.setAttributeNS(null, "rev", V);
|
||||
}
|
||||
|
||||
get shape() {
|
||||
@@ -244,7 +244,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("shape");
|
||||
const value = this.getAttributeNS(null, "shape");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ class HTMLAnchorElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'shape' property on 'HTMLAnchorElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("shape", V);
|
||||
this.setAttributeNS(null, "shape", V);
|
||||
}
|
||||
|
||||
get href() {
|
||||
|
26
node_modules/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js
generated
vendored
26
node_modules/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js
generated
vendored
@@ -17,7 +17,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("alt");
|
||||
const value = this.getAttributeNS(null, "alt");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'alt' property on 'HTMLAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("alt", V);
|
||||
this.setAttributeNS(null, "alt", V);
|
||||
}
|
||||
|
||||
get coords() {
|
||||
@@ -38,7 +38,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("coords");
|
||||
const value = this.getAttributeNS(null, "coords");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'coords' property on 'HTMLAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("coords", V);
|
||||
this.setAttributeNS(null, "coords", V);
|
||||
}
|
||||
|
||||
get shape() {
|
||||
@@ -59,7 +59,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("shape");
|
||||
const value = this.getAttributeNS(null, "shape");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'shape' property on 'HTMLAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("shape", V);
|
||||
this.setAttributeNS(null, "shape", V);
|
||||
}
|
||||
|
||||
get target() {
|
||||
@@ -80,7 +80,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("target");
|
||||
const value = this.getAttributeNS(null, "target");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'target' property on 'HTMLAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("target", V);
|
||||
this.setAttributeNS(null, "target", V);
|
||||
}
|
||||
|
||||
get rel() {
|
||||
@@ -101,7 +101,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("rel");
|
||||
const value = this.getAttributeNS(null, "rel");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'rel' property on 'HTMLAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("rel", V);
|
||||
this.setAttributeNS(null, "rel", V);
|
||||
}
|
||||
|
||||
get relList() {
|
||||
@@ -140,7 +140,7 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("noHref");
|
||||
return this.hasAttributeNS(null, "nohref");
|
||||
}
|
||||
|
||||
set noHref(V) {
|
||||
@@ -153,9 +153,9 @@ class HTMLAreaElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("noHref", "");
|
||||
this.setAttributeNS(null, "nohref", "");
|
||||
} else {
|
||||
this.removeAttribute("noHref");
|
||||
this.removeAttributeNS(null, "nohref");
|
||||
}
|
||||
}
|
||||
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLBRElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLBRElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLBRElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("clear");
|
||||
const value = this.getAttributeNS(null, "clear");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLBRElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'clear' property on 'HTMLBRElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("clear", V);
|
||||
this.setAttributeNS(null, "clear", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLBRElement.prototype, {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js
generated
vendored
@@ -36,7 +36,7 @@ class HTMLBaseElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("target");
|
||||
const value = this.getAttributeNS(null, "target");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class HTMLBaseElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'target' property on 'HTMLBaseElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("target", V);
|
||||
this.setAttributeNS(null, "target", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLBaseElement.prototype, {
|
||||
|
24
node_modules/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js
generated
vendored
24
node_modules/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js
generated
vendored
@@ -17,7 +17,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("text");
|
||||
const value = this.getAttributeNS(null, "text");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("text", V);
|
||||
this.setAttributeNS(null, "text", V);
|
||||
}
|
||||
|
||||
get link() {
|
||||
@@ -39,7 +39,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("link");
|
||||
const value = this.getAttributeNS(null, "link");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("link", V);
|
||||
this.setAttributeNS(null, "link", V);
|
||||
}
|
||||
|
||||
get vLink() {
|
||||
@@ -61,7 +61,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("vLink");
|
||||
const value = this.getAttributeNS(null, "vlink");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("vLink", V);
|
||||
this.setAttributeNS(null, "vlink", V);
|
||||
}
|
||||
|
||||
get aLink() {
|
||||
@@ -83,7 +83,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("aLink");
|
||||
const value = this.getAttributeNS(null, "alink");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("aLink", V);
|
||||
this.setAttributeNS(null, "alink", V);
|
||||
}
|
||||
|
||||
get bgColor() {
|
||||
@@ -105,7 +105,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("bgColor");
|
||||
const value = this.getAttributeNS(null, "bgcolor");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("bgColor", V);
|
||||
this.setAttributeNS(null, "bgcolor", V);
|
||||
}
|
||||
|
||||
get background() {
|
||||
@@ -127,7 +127,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("background");
|
||||
const value = this.getAttributeNS(null, "background");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ class HTMLBodyElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'background' property on 'HTMLBodyElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("background", V);
|
||||
this.setAttributeNS(null, "background", V);
|
||||
}
|
||||
|
||||
get onafterprint() {
|
||||
|
30
node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js
generated
vendored
30
node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js
generated
vendored
@@ -55,7 +55,7 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("autofocus");
|
||||
return this.hasAttributeNS(null, "autofocus");
|
||||
}
|
||||
|
||||
set autofocus(V) {
|
||||
@@ -68,9 +68,9 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("autofocus", "");
|
||||
this.setAttributeNS(null, "autofocus", "");
|
||||
} else {
|
||||
this.removeAttribute("autofocus");
|
||||
this.removeAttributeNS(null, "autofocus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("disabled");
|
||||
return this.hasAttributeNS(null, "disabled");
|
||||
}
|
||||
|
||||
set disabled(V) {
|
||||
@@ -92,9 +92,9 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("disabled", "");
|
||||
this.setAttributeNS(null, "disabled", "");
|
||||
} else {
|
||||
this.removeAttribute("disabled");
|
||||
this.removeAttributeNS(null, "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("formNoValidate");
|
||||
return this.hasAttributeNS(null, "formnovalidate");
|
||||
}
|
||||
|
||||
set formNoValidate(V) {
|
||||
@@ -124,9 +124,9 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("formNoValidate", "");
|
||||
this.setAttributeNS(null, "formnovalidate", "");
|
||||
} else {
|
||||
this.removeAttribute("formNoValidate");
|
||||
this.removeAttributeNS(null, "formnovalidate");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("formTarget");
|
||||
const value = this.getAttributeNS(null, "formtarget");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'formTarget' property on 'HTMLButtonElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("formTarget", V);
|
||||
this.setAttributeNS(null, "formtarget", V);
|
||||
}
|
||||
|
||||
get name() {
|
||||
@@ -156,7 +156,7 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLButtonElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get type() {
|
||||
@@ -197,7 +197,7 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("value");
|
||||
const value = this.getAttributeNS(null, "value");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ class HTMLButtonElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'value' property on 'HTMLButtonElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("value", V);
|
||||
this.setAttributeNS(null, "value", V);
|
||||
}
|
||||
|
||||
get willValidate() {
|
||||
|
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLDListElement.js
generated
vendored
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLDListElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLDListElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("compact");
|
||||
return this.hasAttributeNS(null, "compact");
|
||||
}
|
||||
|
||||
set compact(V) {
|
||||
@@ -29,9 +29,9 @@ class HTMLDListElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("compact", "");
|
||||
this.setAttributeNS(null, "compact", "");
|
||||
} else {
|
||||
this.removeAttribute("compact");
|
||||
this.removeAttributeNS(null, "compact");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLDataElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLDataElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLDataElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("value");
|
||||
const value = this.getAttributeNS(null, "value");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLDataElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'value' property on 'HTMLDataElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("value", V);
|
||||
this.setAttributeNS(null, "value", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLDataElement.prototype, {
|
||||
|
11
node_modules/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js
generated
vendored
11
node_modules/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js
generated
vendored
@@ -10,8 +10,19 @@ class HTMLDataListElement extends HTMLElement.interface {
|
||||
constructor() {
|
||||
throw new TypeError("Illegal constructor");
|
||||
}
|
||||
|
||||
get options() {
|
||||
if (!this || !module.exports.is(this)) {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return utils.getSameObject(this, "options", () => {
|
||||
return utils.tryWrapperForImpl(this[impl]["options"]);
|
||||
});
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLDataListElement.prototype, {
|
||||
options: { enumerable: true },
|
||||
[Symbol.toStringTag]: { value: "HTMLDataListElement", configurable: true }
|
||||
});
|
||||
const iface = {
|
||||
|
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLDetailsElement.js
generated
vendored
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLDetailsElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLDetailsElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("open");
|
||||
return this.hasAttributeNS(null, "open");
|
||||
}
|
||||
|
||||
set open(V) {
|
||||
@@ -29,9 +29,9 @@ class HTMLDetailsElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("open", "");
|
||||
this.setAttributeNS(null, "open", "");
|
||||
} else {
|
||||
this.removeAttribute("open");
|
||||
this.removeAttributeNS(null, "open");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js
generated
vendored
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLDialogElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("open");
|
||||
return this.hasAttributeNS(null, "open");
|
||||
}
|
||||
|
||||
set open(V) {
|
||||
@@ -29,9 +29,9 @@ class HTMLDialogElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("open", "");
|
||||
this.setAttributeNS(null, "open", "");
|
||||
} else {
|
||||
this.removeAttribute("open");
|
||||
this.removeAttributeNS(null, "open");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js
generated
vendored
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLDirectoryElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("compact");
|
||||
return this.hasAttributeNS(null, "compact");
|
||||
}
|
||||
|
||||
set compact(V) {
|
||||
@@ -29,9 +29,9 @@ class HTMLDirectoryElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("compact", "");
|
||||
this.setAttributeNS(null, "compact", "");
|
||||
} else {
|
||||
this.removeAttribute("compact");
|
||||
this.removeAttributeNS(null, "compact");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLDivElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLDivElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLDivElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLDivElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLDivElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLDivElement.prototype, {
|
||||
|
18
node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js
generated
vendored
18
node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js
generated
vendored
@@ -43,7 +43,7 @@ class HTMLElement extends Element.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("title");
|
||||
const value = this.getAttributeNS(null, "title");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class HTMLElement extends Element.interface {
|
||||
context: "Failed to set the 'title' property on 'HTMLElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("title", V);
|
||||
this.setAttributeNS(null, "title", V);
|
||||
}
|
||||
|
||||
get lang() {
|
||||
@@ -64,7 +64,7 @@ class HTMLElement extends Element.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("lang");
|
||||
const value = this.getAttributeNS(null, "lang");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class HTMLElement extends Element.interface {
|
||||
context: "Failed to set the 'lang' property on 'HTMLElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("lang", V);
|
||||
this.setAttributeNS(null, "lang", V);
|
||||
}
|
||||
|
||||
get dir() {
|
||||
@@ -115,7 +115,7 @@ class HTMLElement extends Element.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("hidden");
|
||||
return this.hasAttributeNS(null, "hidden");
|
||||
}
|
||||
|
||||
set hidden(V) {
|
||||
@@ -128,9 +128,9 @@ class HTMLElement extends Element.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("hidden", "");
|
||||
this.setAttributeNS(null, "hidden", "");
|
||||
} else {
|
||||
this.removeAttribute("hidden");
|
||||
this.removeAttributeNS(null, "hidden");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ class HTMLElement extends Element.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("accessKey");
|
||||
const value = this.getAttributeNS(null, "accesskey");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ class HTMLElement extends Element.interface {
|
||||
context: "Failed to set the 'accessKey' property on 'HTMLElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("accessKey", V);
|
||||
this.setAttributeNS(null, "accesskey", V);
|
||||
}
|
||||
|
||||
get draggable() {
|
||||
|
20
node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js
generated
vendored
20
node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js
generated
vendored
@@ -36,7 +36,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLEmbedElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
|
||||
get width() {
|
||||
@@ -57,7 +57,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("width");
|
||||
const value = this.getAttributeNS(null, "width");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLEmbedElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", V);
|
||||
this.setAttributeNS(null, "width", V);
|
||||
}
|
||||
|
||||
get height() {
|
||||
@@ -78,7 +78,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("height");
|
||||
const value = this.getAttributeNS(null, "height");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'height' property on 'HTMLEmbedElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("height", V);
|
||||
this.setAttributeNS(null, "height", V);
|
||||
}
|
||||
|
||||
get align() {
|
||||
@@ -99,7 +99,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLEmbedElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get name() {
|
||||
@@ -120,7 +120,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ class HTMLEmbedElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLEmbedElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLEmbedElement.prototype, {
|
||||
|
10
node_modules/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js
generated
vendored
10
node_modules/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js
generated
vendored
@@ -55,7 +55,7 @@ class HTMLFieldSetElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("disabled");
|
||||
return this.hasAttributeNS(null, "disabled");
|
||||
}
|
||||
|
||||
set disabled(V) {
|
||||
@@ -68,9 +68,9 @@ class HTMLFieldSetElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("disabled", "");
|
||||
this.setAttributeNS(null, "disabled", "");
|
||||
} else {
|
||||
this.removeAttribute("disabled");
|
||||
this.removeAttributeNS(null, "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ class HTMLFieldSetElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class HTMLFieldSetElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLFieldSetElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get type() {
|
||||
|
12
node_modules/jsdom/lib/jsdom/living/generated/HTMLFontElement.js
generated
vendored
12
node_modules/jsdom/lib/jsdom/living/generated/HTMLFontElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLFontElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("color");
|
||||
const value = this.getAttributeNS(null, "color");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class HTMLFontElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("color", V);
|
||||
this.setAttributeNS(null, "color", V);
|
||||
}
|
||||
|
||||
get face() {
|
||||
@@ -38,7 +38,7 @@ class HTMLFontElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("face");
|
||||
const value = this.getAttributeNS(null, "face");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class HTMLFontElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'face' property on 'HTMLFontElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("face", V);
|
||||
this.setAttributeNS(null, "face", V);
|
||||
}
|
||||
|
||||
get size() {
|
||||
@@ -59,7 +59,7 @@ class HTMLFontElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("size");
|
||||
const value = this.getAttributeNS(null, "size");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class HTMLFontElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'size' property on 'HTMLFontElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("size", V);
|
||||
this.setAttributeNS(null, "size", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLFontElement.prototype, {
|
||||
|
18
node_modules/jsdom/lib/jsdom/living/generated/HTMLFormElement.js
generated
vendored
18
node_modules/jsdom/lib/jsdom/living/generated/HTMLFormElement.js
generated
vendored
@@ -48,7 +48,7 @@ class HTMLFormElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("accept-charset");
|
||||
const value = this.getAttributeNS(null, "accept-charset");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class HTMLFormElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'acceptCharset' property on 'HTMLFormElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("accept-charset", V);
|
||||
this.setAttributeNS(null, "accept-charset", V);
|
||||
}
|
||||
|
||||
get action() {
|
||||
@@ -129,7 +129,7 @@ class HTMLFormElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ class HTMLFormElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLFormElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get noValidate() {
|
||||
@@ -150,7 +150,7 @@ class HTMLFormElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("noValidate");
|
||||
return this.hasAttributeNS(null, "novalidate");
|
||||
}
|
||||
|
||||
set noValidate(V) {
|
||||
@@ -163,9 +163,9 @@ class HTMLFormElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("noValidate", "");
|
||||
this.setAttributeNS(null, "novalidate", "");
|
||||
} else {
|
||||
this.removeAttribute("noValidate");
|
||||
this.removeAttributeNS(null, "novalidate");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ class HTMLFormElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("target");
|
||||
const value = this.getAttributeNS(null, "target");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ class HTMLFormElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'target' property on 'HTMLFormElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("target", V);
|
||||
this.setAttributeNS(null, "target", V);
|
||||
}
|
||||
|
||||
get elements() {
|
||||
|
26
node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js
generated
vendored
26
node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get scrolling() {
|
||||
@@ -37,7 +37,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("scrolling");
|
||||
const value = this.getAttributeNS(null, "scrolling");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'scrolling' property on 'HTMLFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("scrolling", V);
|
||||
this.setAttributeNS(null, "scrolling", V);
|
||||
}
|
||||
|
||||
get src() {
|
||||
@@ -78,7 +78,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("frameBorder");
|
||||
const value = this.getAttributeNS(null, "frameborder");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'frameBorder' property on 'HTMLFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("frameBorder", V);
|
||||
this.setAttributeNS(null, "frameborder", V);
|
||||
}
|
||||
|
||||
get longDesc() {
|
||||
@@ -119,7 +119,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("noResize");
|
||||
return this.hasAttributeNS(null, "noresize");
|
||||
}
|
||||
|
||||
set noResize(V) {
|
||||
@@ -132,9 +132,9 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("noResize", "");
|
||||
this.setAttributeNS(null, "noresize", "");
|
||||
} else {
|
||||
this.removeAttribute("noResize");
|
||||
this.removeAttributeNS(null, "noresize");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("marginHeight");
|
||||
const value = this.getAttributeNS(null, "marginheight");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("marginHeight", V);
|
||||
this.setAttributeNS(null, "marginheight", V);
|
||||
}
|
||||
|
||||
get marginWidth() {
|
||||
@@ -181,7 +181,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("marginWidth");
|
||||
const value = this.getAttributeNS(null, "marginwidth");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ class HTMLFrameElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("marginWidth", V);
|
||||
this.setAttributeNS(null, "marginwidth", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLFrameElement.prototype, {
|
||||
|
8
node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js
generated
vendored
8
node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js
generated
vendored
@@ -17,7 +17,7 @@ class HTMLFrameSetElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("cols");
|
||||
const value = this.getAttributeNS(null, "cols");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class HTMLFrameSetElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'cols' property on 'HTMLFrameSetElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("cols", V);
|
||||
this.setAttributeNS(null, "cols", V);
|
||||
}
|
||||
|
||||
get rows() {
|
||||
@@ -38,7 +38,7 @@ class HTMLFrameSetElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("rows");
|
||||
const value = this.getAttributeNS(null, "rows");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class HTMLFrameSetElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'rows' property on 'HTMLFrameSetElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("rows", V);
|
||||
this.setAttributeNS(null, "rows", V);
|
||||
}
|
||||
|
||||
get onafterprint() {
|
||||
|
22
node_modules/jsdom/lib/jsdom/living/generated/HTMLHRElement.js
generated
vendored
22
node_modules/jsdom/lib/jsdom/living/generated/HTMLHRElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLHRElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get color() {
|
||||
@@ -37,7 +37,7 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("color");
|
||||
const value = this.getAttributeNS(null, "color");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'color' property on 'HTMLHRElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("color", V);
|
||||
this.setAttributeNS(null, "color", V);
|
||||
}
|
||||
|
||||
get noShade() {
|
||||
@@ -58,7 +58,7 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("noShade");
|
||||
return this.hasAttributeNS(null, "noshade");
|
||||
}
|
||||
|
||||
set noShade(V) {
|
||||
@@ -71,9 +71,9 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("noShade", "");
|
||||
this.setAttributeNS(null, "noshade", "");
|
||||
} else {
|
||||
this.removeAttribute("noShade");
|
||||
this.removeAttributeNS(null, "noshade");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("size");
|
||||
const value = this.getAttributeNS(null, "size");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'size' property on 'HTMLHRElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("size", V);
|
||||
this.setAttributeNS(null, "size", V);
|
||||
}
|
||||
|
||||
get width() {
|
||||
@@ -103,7 +103,7 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("width");
|
||||
const value = this.getAttributeNS(null, "width");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ class HTMLHRElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLHRElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", V);
|
||||
this.setAttributeNS(null, "width", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLHRElement.prototype, {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLHeadingElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLHeadingElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLHeadingElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLHeadingElement.prototype, {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLHtmlElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("version");
|
||||
const value = this.getAttributeNS(null, "version");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLHtmlElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'version' property on 'HTMLHtmlElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("version", V);
|
||||
this.setAttributeNS(null, "version", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLHtmlElement.prototype, {
|
||||
|
42
node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js
generated
vendored
42
node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js
generated
vendored
@@ -44,7 +44,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("srcdoc");
|
||||
const value = this.getAttributeNS(null, "srcdoc");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'srcdoc' property on 'HTMLIFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("srcdoc", V);
|
||||
this.setAttributeNS(null, "srcdoc", V);
|
||||
}
|
||||
|
||||
get name() {
|
||||
@@ -65,7 +65,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLIFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get allowFullscreen() {
|
||||
@@ -86,7 +86,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("allowFullscreen");
|
||||
return this.hasAttributeNS(null, "allowfullscreen");
|
||||
}
|
||||
|
||||
set allowFullscreen(V) {
|
||||
@@ -99,9 +99,9 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("allowFullscreen", "");
|
||||
this.setAttributeNS(null, "allowfullscreen", "");
|
||||
} else {
|
||||
this.removeAttribute("allowFullscreen");
|
||||
this.removeAttributeNS(null, "allowfullscreen");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("width");
|
||||
const value = this.getAttributeNS(null, "width");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLIFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", V);
|
||||
this.setAttributeNS(null, "width", V);
|
||||
}
|
||||
|
||||
get height() {
|
||||
@@ -131,7 +131,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("height");
|
||||
const value = this.getAttributeNS(null, "height");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'height' property on 'HTMLIFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("height", V);
|
||||
this.setAttributeNS(null, "height", V);
|
||||
}
|
||||
|
||||
get contentDocument() {
|
||||
@@ -168,7 +168,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLIFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get scrolling() {
|
||||
@@ -189,7 +189,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("scrolling");
|
||||
const value = this.getAttributeNS(null, "scrolling");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'scrolling' property on 'HTMLIFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("scrolling", V);
|
||||
this.setAttributeNS(null, "scrolling", V);
|
||||
}
|
||||
|
||||
get frameBorder() {
|
||||
@@ -210,7 +210,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("frameBorder");
|
||||
const value = this.getAttributeNS(null, "frameborder");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'frameBorder' property on 'HTMLIFrameElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("frameBorder", V);
|
||||
this.setAttributeNS(null, "frameborder", V);
|
||||
}
|
||||
|
||||
get longDesc() {
|
||||
@@ -251,7 +251,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("marginHeight");
|
||||
const value = this.getAttributeNS(null, "marginheight");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("marginHeight", V);
|
||||
this.setAttributeNS(null, "marginheight", V);
|
||||
}
|
||||
|
||||
get marginWidth() {
|
||||
@@ -273,7 +273,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("marginWidth");
|
||||
const value = this.getAttributeNS(null, "marginwidth");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ class HTMLIFrameElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("marginWidth", V);
|
||||
this.setAttributeNS(null, "marginwidth", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLIFrameElement.prototype, {
|
||||
|
42
node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js
generated
vendored
42
node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("alt");
|
||||
const value = this.getAttributeNS(null, "alt");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'alt' property on 'HTMLImageElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("alt", V);
|
||||
this.setAttributeNS(null, "alt", V);
|
||||
}
|
||||
|
||||
get src() {
|
||||
@@ -77,7 +77,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("sizes");
|
||||
const value = this.getAttributeNS(null, "sizes");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'sizes' property on 'HTMLImageElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("sizes", V);
|
||||
this.setAttributeNS(null, "sizes", V);
|
||||
}
|
||||
|
||||
get crossOrigin() {
|
||||
@@ -98,7 +98,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("crossOrigin");
|
||||
const value = this.getAttributeNS(null, "crossorigin");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'crossOrigin' property on 'HTMLImageElement': The provided value"
|
||||
});
|
||||
}
|
||||
this.setAttribute("crossOrigin", V);
|
||||
this.setAttributeNS(null, "crossorigin", V);
|
||||
}
|
||||
|
||||
get useMap() {
|
||||
@@ -122,7 +122,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("useMap");
|
||||
const value = this.getAttributeNS(null, "usemap");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'useMap' property on 'HTMLImageElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("useMap", V);
|
||||
this.setAttributeNS(null, "usemap", V);
|
||||
}
|
||||
|
||||
get isMap() {
|
||||
@@ -143,7 +143,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("isMap");
|
||||
return this.hasAttributeNS(null, "ismap");
|
||||
}
|
||||
|
||||
set isMap(V) {
|
||||
@@ -156,9 +156,9 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("isMap", "");
|
||||
this.setAttributeNS(null, "ismap", "");
|
||||
} else {
|
||||
this.removeAttribute("isMap");
|
||||
this.removeAttributeNS(null, "ismap");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLImageElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get lowsrc() {
|
||||
@@ -280,7 +280,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLImageElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get hspace() {
|
||||
@@ -301,7 +301,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("hspace"));
|
||||
const value = parseInt(this.getAttributeNS(null, "hspace"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'hspace' property on 'HTMLImageElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("hspace", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "hspace", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get vspace() {
|
||||
@@ -322,7 +322,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("vspace"));
|
||||
const value = parseInt(this.getAttributeNS(null, "vspace"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'vspace' property on 'HTMLImageElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("vspace", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "vspace", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get longDesc() {
|
||||
@@ -363,7 +363,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("border");
|
||||
const value = this.getAttributeNS(null, "border");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ class HTMLImageElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("border", V);
|
||||
this.setAttributeNS(null, "border", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLImageElement.prototype, {
|
||||
|
111
node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js
generated
vendored
111
node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js
generated
vendored
@@ -192,7 +192,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("accept");
|
||||
const value = this.getAttributeNS(null, "accept");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'accept' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("accept", V);
|
||||
this.setAttributeNS(null, "accept", V);
|
||||
}
|
||||
|
||||
get alt() {
|
||||
@@ -213,7 +213,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("alt");
|
||||
const value = this.getAttributeNS(null, "alt");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'alt' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("alt", V);
|
||||
this.setAttributeNS(null, "alt", V);
|
||||
}
|
||||
|
||||
get autocomplete() {
|
||||
@@ -234,7 +234,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("autocomplete");
|
||||
const value = this.getAttributeNS(null, "autocomplete");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'autocomplete' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("autocomplete", V);
|
||||
this.setAttributeNS(null, "autocomplete", V);
|
||||
}
|
||||
|
||||
get autofocus() {
|
||||
@@ -255,7 +255,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("autofocus");
|
||||
return this.hasAttributeNS(null, "autofocus");
|
||||
}
|
||||
|
||||
set autofocus(V) {
|
||||
@@ -268,9 +268,9 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("autofocus", "");
|
||||
this.setAttributeNS(null, "autofocus", "");
|
||||
} else {
|
||||
this.removeAttribute("autofocus");
|
||||
this.removeAttributeNS(null, "autofocus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("checked");
|
||||
return this.hasAttributeNS(null, "checked");
|
||||
}
|
||||
|
||||
set defaultChecked(V) {
|
||||
@@ -292,9 +292,9 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("checked", "");
|
||||
this.setAttributeNS(null, "checked", "");
|
||||
} else {
|
||||
this.removeAttribute("checked");
|
||||
this.removeAttributeNS(null, "checked");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("dirName");
|
||||
const value = this.getAttributeNS(null, "dirname");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'dirName' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("dirName", V);
|
||||
this.setAttributeNS(null, "dirname", V);
|
||||
}
|
||||
|
||||
get disabled() {
|
||||
@@ -344,7 +344,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("disabled");
|
||||
return this.hasAttributeNS(null, "disabled");
|
||||
}
|
||||
|
||||
set disabled(V) {
|
||||
@@ -357,9 +357,9 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("disabled", "");
|
||||
this.setAttributeNS(null, "disabled", "");
|
||||
} else {
|
||||
this.removeAttribute("disabled");
|
||||
this.removeAttributeNS(null, "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("formNoValidate");
|
||||
return this.hasAttributeNS(null, "formnovalidate");
|
||||
}
|
||||
|
||||
set formNoValidate(V) {
|
||||
@@ -412,9 +412,9 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("formNoValidate", "");
|
||||
this.setAttributeNS(null, "formnovalidate", "");
|
||||
} else {
|
||||
this.removeAttribute("formNoValidate");
|
||||
this.removeAttributeNS(null, "formnovalidate");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("formTarget");
|
||||
const value = this.getAttributeNS(null, "formtarget");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'formTarget' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("formTarget", V);
|
||||
this.setAttributeNS(null, "formtarget", V);
|
||||
}
|
||||
|
||||
get indeterminate() {
|
||||
@@ -464,7 +464,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("inputMode");
|
||||
const value = this.getAttributeNS(null, "inputmode");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -477,7 +477,15 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'inputMode' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("inputMode", V);
|
||||
this.setAttributeNS(null, "inputmode", V);
|
||||
}
|
||||
|
||||
get list() {
|
||||
if (!this || !module.exports.is(this)) {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return utils.tryWrapperForImpl(this[impl]["list"]);
|
||||
}
|
||||
|
||||
get max() {
|
||||
@@ -485,7 +493,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("max");
|
||||
const value = this.getAttributeNS(null, "max");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -498,7 +506,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'max' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("max", V);
|
||||
this.setAttributeNS(null, "max", V);
|
||||
}
|
||||
|
||||
get maxLength() {
|
||||
@@ -526,7 +534,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("min");
|
||||
const value = this.getAttributeNS(null, "min");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -539,7 +547,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'min' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("min", V);
|
||||
this.setAttributeNS(null, "min", V);
|
||||
}
|
||||
|
||||
get minLength() {
|
||||
@@ -567,7 +575,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("multiple");
|
||||
return this.hasAttributeNS(null, "multiple");
|
||||
}
|
||||
|
||||
set multiple(V) {
|
||||
@@ -580,9 +588,9 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("multiple", "");
|
||||
this.setAttributeNS(null, "multiple", "");
|
||||
} else {
|
||||
this.removeAttribute("multiple");
|
||||
this.removeAttributeNS(null, "multiple");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,7 +599,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -604,7 +612,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get pattern() {
|
||||
@@ -612,7 +620,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("pattern");
|
||||
const value = this.getAttributeNS(null, "pattern");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -625,7 +633,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'pattern' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("pattern", V);
|
||||
this.setAttributeNS(null, "pattern", V);
|
||||
}
|
||||
|
||||
get placeholder() {
|
||||
@@ -633,7 +641,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("placeholder");
|
||||
const value = this.getAttributeNS(null, "placeholder");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -646,7 +654,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'placeholder' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("placeholder", V);
|
||||
this.setAttributeNS(null, "placeholder", V);
|
||||
}
|
||||
|
||||
get readOnly() {
|
||||
@@ -654,7 +662,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("readOnly");
|
||||
return this.hasAttributeNS(null, "readonly");
|
||||
}
|
||||
|
||||
set readOnly(V) {
|
||||
@@ -667,9 +675,9 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("readOnly", "");
|
||||
this.setAttributeNS(null, "readonly", "");
|
||||
} else {
|
||||
this.removeAttribute("readOnly");
|
||||
this.removeAttributeNS(null, "readonly");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,7 +686,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("required");
|
||||
return this.hasAttributeNS(null, "required");
|
||||
}
|
||||
|
||||
set required(V) {
|
||||
@@ -691,9 +699,9 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("required", "");
|
||||
this.setAttributeNS(null, "required", "");
|
||||
} else {
|
||||
this.removeAttribute("required");
|
||||
this.removeAttributeNS(null, "required");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -742,7 +750,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("step");
|
||||
const value = this.getAttributeNS(null, "step");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -755,7 +763,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'step' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("step", V);
|
||||
this.setAttributeNS(null, "step", V);
|
||||
}
|
||||
|
||||
get type() {
|
||||
@@ -783,7 +791,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("value");
|
||||
const value = this.getAttributeNS(null, "value");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -796,7 +804,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'defaultValue' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("value", V);
|
||||
this.setAttributeNS(null, "value", V);
|
||||
}
|
||||
|
||||
get value() {
|
||||
@@ -926,7 +934,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -939,7 +947,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get useMap() {
|
||||
@@ -947,7 +955,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("useMap");
|
||||
const value = this.getAttributeNS(null, "usemap");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -960,7 +968,7 @@ class HTMLInputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'useMap' property on 'HTMLInputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("useMap", V);
|
||||
this.setAttributeNS(null, "usemap", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLInputElement.prototype, {
|
||||
@@ -984,6 +992,7 @@ Object.defineProperties(HTMLInputElement.prototype, {
|
||||
formTarget: { enumerable: true },
|
||||
indeterminate: { enumerable: true },
|
||||
inputMode: { enumerable: true },
|
||||
list: { enumerable: true },
|
||||
max: { enumerable: true },
|
||||
maxLength: { enumerable: true },
|
||||
min: { enumerable: true },
|
||||
|
8
node_modules/jsdom/lib/jsdom/living/generated/HTMLLIElement.js
generated
vendored
8
node_modules/jsdom/lib/jsdom/living/generated/HTMLLIElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLLIElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("value"));
|
||||
const value = parseInt(this.getAttributeNS(null, "value"));
|
||||
return isNaN(value) || value < -2147483648 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLLIElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'value' property on 'HTMLLIElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("value", String(V));
|
||||
this.setAttributeNS(null, "value", String(V));
|
||||
}
|
||||
|
||||
get type() {
|
||||
@@ -37,7 +37,7 @@ class HTMLLIElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class HTMLLIElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLLIElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLLIElement.prototype, {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js
generated
vendored
@@ -24,7 +24,7 @@ class HTMLLabelElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("for");
|
||||
const value = this.getAttributeNS(null, "for");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class HTMLLabelElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'htmlFor' property on 'HTMLLabelElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("for", V);
|
||||
this.setAttributeNS(null, "for", V);
|
||||
}
|
||||
|
||||
get control() {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js
generated
vendored
@@ -24,7 +24,7 @@ class HTMLLegendElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class HTMLLegendElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLLegendElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLLegendElement.prototype, {
|
||||
|
32
node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js
generated
vendored
32
node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js
generated
vendored
@@ -37,7 +37,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("crossOrigin");
|
||||
const value = this.getAttributeNS(null, "crossorigin");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'crossOrigin' property on 'HTMLLinkElement': The provided value"
|
||||
});
|
||||
}
|
||||
this.setAttribute("crossOrigin", V);
|
||||
this.setAttributeNS(null, "crossorigin", V);
|
||||
}
|
||||
|
||||
get rel() {
|
||||
@@ -61,7 +61,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("rel");
|
||||
const value = this.getAttributeNS(null, "rel");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'rel' property on 'HTMLLinkElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("rel", V);
|
||||
this.setAttributeNS(null, "rel", V);
|
||||
}
|
||||
|
||||
get relList() {
|
||||
@@ -100,7 +100,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("media");
|
||||
const value = this.getAttributeNS(null, "media");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'media' property on 'HTMLLinkElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("media", V);
|
||||
this.setAttributeNS(null, "media", V);
|
||||
}
|
||||
|
||||
get hreflang() {
|
||||
@@ -121,7 +121,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("hreflang");
|
||||
const value = this.getAttributeNS(null, "hreflang");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'hreflang' property on 'HTMLLinkElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("hreflang", V);
|
||||
this.setAttributeNS(null, "hreflang", V);
|
||||
}
|
||||
|
||||
get type() {
|
||||
@@ -142,7 +142,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLLinkElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
|
||||
get charset() {
|
||||
@@ -163,7 +163,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("charset");
|
||||
const value = this.getAttributeNS(null, "charset");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'charset' property on 'HTMLLinkElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("charset", V);
|
||||
this.setAttributeNS(null, "charset", V);
|
||||
}
|
||||
|
||||
get rev() {
|
||||
@@ -184,7 +184,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("rev");
|
||||
const value = this.getAttributeNS(null, "rev");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'rev' property on 'HTMLLinkElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("rev", V);
|
||||
this.setAttributeNS(null, "rev", V);
|
||||
}
|
||||
|
||||
get target() {
|
||||
@@ -205,7 +205,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("target");
|
||||
const value = this.getAttributeNS(null, "target");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ class HTMLLinkElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'target' property on 'HTMLLinkElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("target", V);
|
||||
this.setAttributeNS(null, "target", V);
|
||||
}
|
||||
|
||||
get sheet() {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLMapElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLMapElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLMapElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLMapElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLMapElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get areas() {
|
||||
|
42
node_modules/jsdom/lib/jsdom/living/generated/HTMLMarqueeElement.js
generated
vendored
42
node_modules/jsdom/lib/jsdom/living/generated/HTMLMarqueeElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("behavior");
|
||||
const value = this.getAttributeNS(null, "behavior");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'behavior' property on 'HTMLMarqueeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("behavior", V);
|
||||
this.setAttributeNS(null, "behavior", V);
|
||||
}
|
||||
|
||||
get bgColor() {
|
||||
@@ -37,7 +37,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("bgcolor");
|
||||
const value = this.getAttributeNS(null, "bgcolor");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'bgColor' property on 'HTMLMarqueeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("bgcolor", V);
|
||||
this.setAttributeNS(null, "bgcolor", V);
|
||||
}
|
||||
|
||||
get direction() {
|
||||
@@ -58,7 +58,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("direction");
|
||||
const value = this.getAttributeNS(null, "direction");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'direction' property on 'HTMLMarqueeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("direction", V);
|
||||
this.setAttributeNS(null, "direction", V);
|
||||
}
|
||||
|
||||
get height() {
|
||||
@@ -79,7 +79,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("height");
|
||||
const value = this.getAttributeNS(null, "height");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'height' property on 'HTMLMarqueeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("height", V);
|
||||
this.setAttributeNS(null, "height", V);
|
||||
}
|
||||
|
||||
get hspace() {
|
||||
@@ -100,7 +100,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("hspace"));
|
||||
const value = parseInt(this.getAttributeNS(null, "hspace"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'hspace' property on 'HTMLMarqueeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("hspace", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "hspace", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get scrollAmount() {
|
||||
@@ -121,7 +121,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("scrollamount"));
|
||||
const value = parseInt(this.getAttributeNS(null, "scrollamount"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'scrollAmount' property on 'HTMLMarqueeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("scrollamount", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "scrollamount", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get scrollDelay() {
|
||||
@@ -142,7 +142,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("scrolldelay"));
|
||||
const value = parseInt(this.getAttributeNS(null, "scrolldelay"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'scrollDelay' property on 'HTMLMarqueeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("scrolldelay", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "scrolldelay", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get trueSpeed() {
|
||||
@@ -163,7 +163,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("truespeed");
|
||||
return this.hasAttributeNS(null, "truespeed");
|
||||
}
|
||||
|
||||
set trueSpeed(V) {
|
||||
@@ -176,9 +176,9 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("truespeed", "");
|
||||
this.setAttributeNS(null, "truespeed", "");
|
||||
} else {
|
||||
this.removeAttribute("truespeed");
|
||||
this.removeAttributeNS(null, "truespeed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("vspace"));
|
||||
const value = parseInt(this.getAttributeNS(null, "vspace"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'vspace' property on 'HTMLMarqueeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("vspace", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "vspace", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get width() {
|
||||
@@ -208,7 +208,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("width");
|
||||
const value = this.getAttributeNS(null, "width");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ class HTMLMarqueeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLMarqueeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", V);
|
||||
this.setAttributeNS(null, "width", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLMarqueeElement.prototype, {
|
||||
|
32
node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js
generated
vendored
32
node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js
generated
vendored
@@ -137,7 +137,7 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("crossOrigin");
|
||||
const value = this.getAttributeNS(null, "crossorigin");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'crossOrigin' property on 'HTMLMediaElement': The provided value"
|
||||
});
|
||||
}
|
||||
this.setAttribute("crossOrigin", V);
|
||||
this.setAttributeNS(null, "crossorigin", V);
|
||||
}
|
||||
|
||||
get networkState() {
|
||||
@@ -169,7 +169,7 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("preload");
|
||||
const value = this.getAttributeNS(null, "preload");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'preload' property on 'HTMLMediaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("preload", V);
|
||||
this.setAttributeNS(null, "preload", V);
|
||||
}
|
||||
|
||||
get buffered() {
|
||||
@@ -314,7 +314,7 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("autoplay");
|
||||
return this.hasAttributeNS(null, "autoplay");
|
||||
}
|
||||
|
||||
set autoplay(V) {
|
||||
@@ -327,9 +327,9 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("autoplay", "");
|
||||
this.setAttributeNS(null, "autoplay", "");
|
||||
} else {
|
||||
this.removeAttribute("autoplay");
|
||||
this.removeAttributeNS(null, "autoplay");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("loop");
|
||||
return this.hasAttributeNS(null, "loop");
|
||||
}
|
||||
|
||||
set loop(V) {
|
||||
@@ -351,9 +351,9 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("loop", "");
|
||||
this.setAttributeNS(null, "loop", "");
|
||||
} else {
|
||||
this.removeAttribute("loop");
|
||||
this.removeAttributeNS(null, "loop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("controls");
|
||||
return this.hasAttributeNS(null, "controls");
|
||||
}
|
||||
|
||||
set controls(V) {
|
||||
@@ -375,9 +375,9 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("controls", "");
|
||||
this.setAttributeNS(null, "controls", "");
|
||||
} else {
|
||||
this.removeAttribute("controls");
|
||||
this.removeAttributeNS(null, "controls");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("muted");
|
||||
return this.hasAttributeNS(null, "muted");
|
||||
}
|
||||
|
||||
set defaultMuted(V) {
|
||||
@@ -439,9 +439,9 @@ class HTMLMediaElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("muted", "");
|
||||
this.setAttributeNS(null, "muted", "");
|
||||
} else {
|
||||
this.removeAttribute("muted");
|
||||
this.removeAttributeNS(null, "muted");
|
||||
}
|
||||
}
|
||||
|
||||
|
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js
generated
vendored
6
node_modules/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLMenuElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("compact");
|
||||
return this.hasAttributeNS(null, "compact");
|
||||
}
|
||||
|
||||
set compact(V) {
|
||||
@@ -29,9 +29,9 @@ class HTMLMenuElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("compact", "");
|
||||
this.setAttributeNS(null, "compact", "");
|
||||
} else {
|
||||
this.removeAttribute("compact");
|
||||
this.removeAttributeNS(null, "compact");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
node_modules/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js
generated
vendored
16
node_modules/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLMetaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLMetaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLMetaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get httpEquiv() {
|
||||
@@ -37,7 +37,7 @@ class HTMLMetaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("http-equiv");
|
||||
const value = this.getAttributeNS(null, "http-equiv");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class HTMLMetaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'httpEquiv' property on 'HTMLMetaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("http-equiv", V);
|
||||
this.setAttributeNS(null, "http-equiv", V);
|
||||
}
|
||||
|
||||
get content() {
|
||||
@@ -58,7 +58,7 @@ class HTMLMetaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("content");
|
||||
const value = this.getAttributeNS(null, "content");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class HTMLMetaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'content' property on 'HTMLMetaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("content", V);
|
||||
this.setAttributeNS(null, "content", V);
|
||||
}
|
||||
|
||||
get scheme() {
|
||||
@@ -79,7 +79,7 @@ class HTMLMetaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("scheme");
|
||||
const value = this.getAttributeNS(null, "scheme");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ class HTMLMetaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'scheme' property on 'HTMLMetaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("scheme", V);
|
||||
this.setAttributeNS(null, "scheme", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLMetaElement.prototype, {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js
generated
vendored
@@ -36,7 +36,7 @@ class HTMLModElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("dateTime");
|
||||
const value = this.getAttributeNS(null, "datetime");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class HTMLModElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'dateTime' property on 'HTMLModElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("dateTime", V);
|
||||
this.setAttributeNS(null, "datetime", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLModElement.prototype, {
|
||||
|
16
node_modules/jsdom/lib/jsdom/living/generated/HTMLOListElement.js
generated
vendored
16
node_modules/jsdom/lib/jsdom/living/generated/HTMLOListElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLOListElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("reversed");
|
||||
return this.hasAttributeNS(null, "reversed");
|
||||
}
|
||||
|
||||
set reversed(V) {
|
||||
@@ -29,9 +29,9 @@ class HTMLOListElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("reversed", "");
|
||||
this.setAttributeNS(null, "reversed", "");
|
||||
} else {
|
||||
this.removeAttribute("reversed");
|
||||
this.removeAttributeNS(null, "reversed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class HTMLOListElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class HTMLOListElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLOListElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
|
||||
get compact() {
|
||||
@@ -81,7 +81,7 @@ class HTMLOListElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("compact");
|
||||
return this.hasAttributeNS(null, "compact");
|
||||
}
|
||||
|
||||
set compact(V) {
|
||||
@@ -94,9 +94,9 @@ class HTMLOListElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("compact", "");
|
||||
this.setAttributeNS(null, "compact", "");
|
||||
} else {
|
||||
this.removeAttribute("compact");
|
||||
this.removeAttributeNS(null, "compact");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
58
node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js
generated
vendored
58
node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js
generated
vendored
@@ -75,7 +75,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
|
||||
get name() {
|
||||
@@ -96,7 +96,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get useMap() {
|
||||
@@ -117,7 +117,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("useMap");
|
||||
const value = this.getAttributeNS(null, "usemap");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'useMap' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("useMap", V);
|
||||
this.setAttributeNS(null, "usemap", V);
|
||||
}
|
||||
|
||||
get form() {
|
||||
@@ -146,7 +146,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("width");
|
||||
const value = this.getAttributeNS(null, "width");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", V);
|
||||
this.setAttributeNS(null, "width", V);
|
||||
}
|
||||
|
||||
get height() {
|
||||
@@ -167,7 +167,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("height");
|
||||
const value = this.getAttributeNS(null, "height");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'height' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("height", V);
|
||||
this.setAttributeNS(null, "height", V);
|
||||
}
|
||||
|
||||
get contentDocument() {
|
||||
@@ -220,7 +220,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get archive() {
|
||||
@@ -241,7 +241,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("archive");
|
||||
const value = this.getAttributeNS(null, "archive");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'archive' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("archive", V);
|
||||
this.setAttributeNS(null, "archive", V);
|
||||
}
|
||||
|
||||
get code() {
|
||||
@@ -262,7 +262,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("code");
|
||||
const value = this.getAttributeNS(null, "code");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'code' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("code", V);
|
||||
this.setAttributeNS(null, "code", V);
|
||||
}
|
||||
|
||||
get declare() {
|
||||
@@ -283,7 +283,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("declare");
|
||||
return this.hasAttributeNS(null, "declare");
|
||||
}
|
||||
|
||||
set declare(V) {
|
||||
@@ -296,9 +296,9 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("declare", "");
|
||||
this.setAttributeNS(null, "declare", "");
|
||||
} else {
|
||||
this.removeAttribute("declare");
|
||||
this.removeAttributeNS(null, "declare");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("hspace"));
|
||||
const value = parseInt(this.getAttributeNS(null, "hspace"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'hspace' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("hspace", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "hspace", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get standby() {
|
||||
@@ -328,7 +328,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("standby");
|
||||
const value = this.getAttributeNS(null, "standby");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'standby' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("standby", V);
|
||||
this.setAttributeNS(null, "standby", V);
|
||||
}
|
||||
|
||||
get vspace() {
|
||||
@@ -349,7 +349,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("vspace"));
|
||||
const value = parseInt(this.getAttributeNS(null, "vspace"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'vspace' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("vspace", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "vspace", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get codeBase() {
|
||||
@@ -390,7 +390,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("codeType");
|
||||
const value = this.getAttributeNS(null, "codetype");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'codeType' property on 'HTMLObjectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("codeType", V);
|
||||
this.setAttributeNS(null, "codetype", V);
|
||||
}
|
||||
|
||||
get border() {
|
||||
@@ -411,7 +411,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("border");
|
||||
const value = this.getAttributeNS(null, "border");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ class HTMLObjectElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("border", V);
|
||||
this.setAttributeNS(null, "border", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLObjectElement.prototype, {
|
||||
|
10
node_modules/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js
generated
vendored
10
node_modules/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLOptGroupElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("disabled");
|
||||
return this.hasAttributeNS(null, "disabled");
|
||||
}
|
||||
|
||||
set disabled(V) {
|
||||
@@ -29,9 +29,9 @@ class HTMLOptGroupElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("disabled", "");
|
||||
this.setAttributeNS(null, "disabled", "");
|
||||
} else {
|
||||
this.removeAttribute("disabled");
|
||||
this.removeAttributeNS(null, "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class HTMLOptGroupElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("label");
|
||||
const value = this.getAttributeNS(null, "label");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class HTMLOptGroupElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'label' property on 'HTMLOptGroupElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("label", V);
|
||||
this.setAttributeNS(null, "label", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLOptGroupElement.prototype, {
|
||||
|
12
node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js
generated
vendored
12
node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLOptionElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("disabled");
|
||||
return this.hasAttributeNS(null, "disabled");
|
||||
}
|
||||
|
||||
set disabled(V) {
|
||||
@@ -29,9 +29,9 @@ class HTMLOptionElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("disabled", "");
|
||||
this.setAttributeNS(null, "disabled", "");
|
||||
} else {
|
||||
this.removeAttribute("disabled");
|
||||
this.removeAttributeNS(null, "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class HTMLOptionElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("selected");
|
||||
return this.hasAttributeNS(null, "selected");
|
||||
}
|
||||
|
||||
set defaultSelected(V) {
|
||||
@@ -81,9 +81,9 @@ class HTMLOptionElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("selected", "");
|
||||
this.setAttributeNS(null, "selected", "");
|
||||
} else {
|
||||
this.removeAttribute("selected");
|
||||
this.removeAttributeNS(null, "selected");
|
||||
}
|
||||
}
|
||||
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js
generated
vendored
@@ -81,7 +81,7 @@ class HTMLOutputElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ class HTMLOutputElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLOutputElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get type() {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLParagraphElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLParagraphElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLParagraphElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLParagraphElement.prototype, {
|
||||
|
16
node_modules/jsdom/lib/jsdom/living/generated/HTMLParamElement.js
generated
vendored
16
node_modules/jsdom/lib/jsdom/living/generated/HTMLParamElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLParamElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLParamElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLParamElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get value() {
|
||||
@@ -37,7 +37,7 @@ class HTMLParamElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("value");
|
||||
const value = this.getAttributeNS(null, "value");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class HTMLParamElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'value' property on 'HTMLParamElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("value", V);
|
||||
this.setAttributeNS(null, "value", V);
|
||||
}
|
||||
|
||||
get type() {
|
||||
@@ -58,7 +58,7 @@ class HTMLParamElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class HTMLParamElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLParamElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
|
||||
get valueType() {
|
||||
@@ -79,7 +79,7 @@ class HTMLParamElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("valueType");
|
||||
const value = this.getAttributeNS(null, "valuetype");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ class HTMLParamElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'valueType' property on 'HTMLParamElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("valueType", V);
|
||||
this.setAttributeNS(null, "valuetype", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLParamElement.prototype, {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLPreElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLPreElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLPreElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("width"));
|
||||
const value = parseInt(this.getAttributeNS(null, "width"));
|
||||
return isNaN(value) || value < -2147483648 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLPreElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLPreElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", String(V));
|
||||
this.setAttributeNS(null, "width", String(V));
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLPreElement.prototype, {
|
||||
|
30
node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js
generated
vendored
30
node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js
generated
vendored
@@ -36,7 +36,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLScriptElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
|
||||
get defer() {
|
||||
@@ -57,7 +57,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("defer");
|
||||
return this.hasAttributeNS(null, "defer");
|
||||
}
|
||||
|
||||
set defer(V) {
|
||||
@@ -70,9 +70,9 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("defer", "");
|
||||
this.setAttributeNS(null, "defer", "");
|
||||
} else {
|
||||
this.removeAttribute("defer");
|
||||
this.removeAttributeNS(null, "defer");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("crossOrigin");
|
||||
const value = this.getAttributeNS(null, "crossorigin");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'crossOrigin' property on 'HTMLScriptElement': The provided value"
|
||||
});
|
||||
}
|
||||
this.setAttribute("crossOrigin", V);
|
||||
this.setAttributeNS(null, "crossorigin", V);
|
||||
}
|
||||
|
||||
get text() {
|
||||
@@ -125,7 +125,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("nonce");
|
||||
const value = this.getAttributeNS(null, "nonce");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'nonce' property on 'HTMLScriptElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("nonce", V);
|
||||
this.setAttributeNS(null, "nonce", V);
|
||||
}
|
||||
|
||||
get charset() {
|
||||
@@ -146,7 +146,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("charset");
|
||||
const value = this.getAttributeNS(null, "charset");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'charset' property on 'HTMLScriptElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("charset", V);
|
||||
this.setAttributeNS(null, "charset", V);
|
||||
}
|
||||
|
||||
get event() {
|
||||
@@ -167,7 +167,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("event");
|
||||
const value = this.getAttributeNS(null, "event");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'event' property on 'HTMLScriptElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("event", V);
|
||||
this.setAttributeNS(null, "event", V);
|
||||
}
|
||||
|
||||
get htmlFor() {
|
||||
@@ -188,7 +188,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("for");
|
||||
const value = this.getAttributeNS(null, "for");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ class HTMLScriptElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'htmlFor' property on 'HTMLScriptElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("for", V);
|
||||
this.setAttributeNS(null, "for", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLScriptElement.prototype, {
|
||||
|
32
node_modules/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js
generated
vendored
32
node_modules/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js
generated
vendored
@@ -174,7 +174,7 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("autofocus");
|
||||
return this.hasAttributeNS(null, "autofocus");
|
||||
}
|
||||
|
||||
set autofocus(V) {
|
||||
@@ -187,9 +187,9 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("autofocus", "");
|
||||
this.setAttributeNS(null, "autofocus", "");
|
||||
} else {
|
||||
this.removeAttribute("autofocus");
|
||||
this.removeAttributeNS(null, "autofocus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("disabled");
|
||||
return this.hasAttributeNS(null, "disabled");
|
||||
}
|
||||
|
||||
set disabled(V) {
|
||||
@@ -211,9 +211,9 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("disabled", "");
|
||||
this.setAttributeNS(null, "disabled", "");
|
||||
} else {
|
||||
this.removeAttribute("disabled");
|
||||
this.removeAttributeNS(null, "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("multiple");
|
||||
return this.hasAttributeNS(null, "multiple");
|
||||
}
|
||||
|
||||
set multiple(V) {
|
||||
@@ -243,9 +243,9 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("multiple", "");
|
||||
this.setAttributeNS(null, "multiple", "");
|
||||
} else {
|
||||
this.removeAttribute("multiple");
|
||||
this.removeAttributeNS(null, "multiple");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLSelectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get required() {
|
||||
@@ -275,7 +275,7 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("required");
|
||||
return this.hasAttributeNS(null, "required");
|
||||
}
|
||||
|
||||
set required(V) {
|
||||
@@ -288,9 +288,9 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("required", "");
|
||||
this.setAttributeNS(null, "required", "");
|
||||
} else {
|
||||
this.removeAttribute("required");
|
||||
this.removeAttributeNS(null, "required");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("size"));
|
||||
const value = parseInt(this.getAttributeNS(null, "size"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ class HTMLSelectElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'size' property on 'HTMLSelectElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("size", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "size", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get type() {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLSlotElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLSlotElement.js
generated
vendored
@@ -47,7 +47,7 @@ class HTMLSlotElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class HTMLSlotElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLSlotElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLSlotElement.prototype, {
|
||||
|
12
node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js
generated
vendored
12
node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js
generated
vendored
@@ -36,7 +36,7 @@ class HTMLSourceElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class HTMLSourceElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLSourceElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
|
||||
get srcset() {
|
||||
@@ -77,7 +77,7 @@ class HTMLSourceElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("sizes");
|
||||
const value = this.getAttributeNS(null, "sizes");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class HTMLSourceElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'sizes' property on 'HTMLSourceElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("sizes", V);
|
||||
this.setAttributeNS(null, "sizes", V);
|
||||
}
|
||||
|
||||
get media() {
|
||||
@@ -98,7 +98,7 @@ class HTMLSourceElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("media");
|
||||
const value = this.getAttributeNS(null, "media");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ class HTMLSourceElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'media' property on 'HTMLSourceElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("media", V);
|
||||
this.setAttributeNS(null, "media", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLSourceElement.prototype, {
|
||||
|
12
node_modules/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js
generated
vendored
12
node_modules/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js
generated
vendored
@@ -17,7 +17,7 @@ class HTMLStyleElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("media");
|
||||
const value = this.getAttributeNS(null, "media");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class HTMLStyleElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'media' property on 'HTMLStyleElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("media", V);
|
||||
this.setAttributeNS(null, "media", V);
|
||||
}
|
||||
|
||||
get nonce() {
|
||||
@@ -38,7 +38,7 @@ class HTMLStyleElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("nonce");
|
||||
const value = this.getAttributeNS(null, "nonce");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class HTMLStyleElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'nonce' property on 'HTMLStyleElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("nonce", V);
|
||||
this.setAttributeNS(null, "nonce", V);
|
||||
}
|
||||
|
||||
get type() {
|
||||
@@ -59,7 +59,7 @@ class HTMLStyleElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class HTMLStyleElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLStyleElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
|
||||
get sheet() {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLTableCaptionElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLTableCaptionElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLTableCaptionElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLTableCaptionElement.prototype, {
|
||||
|
46
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js
generated
vendored
46
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js
generated
vendored
@@ -56,7 +56,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("headers");
|
||||
const value = this.getAttributeNS(null, "headers");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'headers' property on 'HTMLTableCellElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("headers", V);
|
||||
this.setAttributeNS(null, "headers", V);
|
||||
}
|
||||
|
||||
get cellIndex() {
|
||||
@@ -105,7 +105,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("abbr");
|
||||
const value = this.getAttributeNS(null, "abbr");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'abbr' property on 'HTMLTableCellElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("abbr", V);
|
||||
this.setAttributeNS(null, "abbr", V);
|
||||
}
|
||||
|
||||
get align() {
|
||||
@@ -126,7 +126,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLTableCellElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get axis() {
|
||||
@@ -147,7 +147,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("axis");
|
||||
const value = this.getAttributeNS(null, "axis");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'axis' property on 'HTMLTableCellElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("axis", V);
|
||||
this.setAttributeNS(null, "axis", V);
|
||||
}
|
||||
|
||||
get height() {
|
||||
@@ -168,7 +168,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("height");
|
||||
const value = this.getAttributeNS(null, "height");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'height' property on 'HTMLTableCellElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("height", V);
|
||||
this.setAttributeNS(null, "height", V);
|
||||
}
|
||||
|
||||
get width() {
|
||||
@@ -189,7 +189,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("width");
|
||||
const value = this.getAttributeNS(null, "width");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLTableCellElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", V);
|
||||
this.setAttributeNS(null, "width", V);
|
||||
}
|
||||
|
||||
get ch() {
|
||||
@@ -210,7 +210,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("char");
|
||||
const value = this.getAttributeNS(null, "char");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'ch' property on 'HTMLTableCellElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("char", V);
|
||||
this.setAttributeNS(null, "char", V);
|
||||
}
|
||||
|
||||
get chOff() {
|
||||
@@ -231,7 +231,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("charoff");
|
||||
const value = this.getAttributeNS(null, "charoff");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'chOff' property on 'HTMLTableCellElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("charoff", V);
|
||||
this.setAttributeNS(null, "charoff", V);
|
||||
}
|
||||
|
||||
get noWrap() {
|
||||
@@ -252,7 +252,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("noWrap");
|
||||
return this.hasAttributeNS(null, "nowrap");
|
||||
}
|
||||
|
||||
set noWrap(V) {
|
||||
@@ -265,9 +265,9 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("noWrap", "");
|
||||
this.setAttributeNS(null, "nowrap", "");
|
||||
} else {
|
||||
this.removeAttribute("noWrap");
|
||||
this.removeAttributeNS(null, "nowrap");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("vAlign");
|
||||
const value = this.getAttributeNS(null, "valign");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'vAlign' property on 'HTMLTableCellElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("vAlign", V);
|
||||
this.setAttributeNS(null, "valign", V);
|
||||
}
|
||||
|
||||
get bgColor() {
|
||||
@@ -297,7 +297,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("bgColor");
|
||||
const value = this.getAttributeNS(null, "bgcolor");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ class HTMLTableCellElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("bgColor", V);
|
||||
this.setAttributeNS(null, "bgcolor", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLTableCellElement.prototype, {
|
||||
|
24
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js
generated
vendored
24
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("span"));
|
||||
const value = parseInt(this.getAttributeNS(null, "span"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'span' property on 'HTMLTableColElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("span", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "span", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get align() {
|
||||
@@ -37,7 +37,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLTableColElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get ch() {
|
||||
@@ -58,7 +58,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("char");
|
||||
const value = this.getAttributeNS(null, "char");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'ch' property on 'HTMLTableColElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("char", V);
|
||||
this.setAttributeNS(null, "char", V);
|
||||
}
|
||||
|
||||
get chOff() {
|
||||
@@ -79,7 +79,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("charoff");
|
||||
const value = this.getAttributeNS(null, "charoff");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'chOff' property on 'HTMLTableColElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("charoff", V);
|
||||
this.setAttributeNS(null, "charoff", V);
|
||||
}
|
||||
|
||||
get vAlign() {
|
||||
@@ -100,7 +100,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("vAlign");
|
||||
const value = this.getAttributeNS(null, "valign");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'vAlign' property on 'HTMLTableColElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("vAlign", V);
|
||||
this.setAttributeNS(null, "valign", V);
|
||||
}
|
||||
|
||||
get width() {
|
||||
@@ -121,7 +121,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("width");
|
||||
const value = this.getAttributeNS(null, "width");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ class HTMLTableColElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLTableColElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", V);
|
||||
this.setAttributeNS(null, "width", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLTableColElement.prototype, {
|
||||
|
36
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableElement.js
generated
vendored
36
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableElement.js
generated
vendored
@@ -205,7 +205,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLTableElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get border() {
|
||||
@@ -226,7 +226,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("border");
|
||||
const value = this.getAttributeNS(null, "border");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'border' property on 'HTMLTableElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("border", V);
|
||||
this.setAttributeNS(null, "border", V);
|
||||
}
|
||||
|
||||
get frame() {
|
||||
@@ -247,7 +247,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("frame");
|
||||
const value = this.getAttributeNS(null, "frame");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'frame' property on 'HTMLTableElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("frame", V);
|
||||
this.setAttributeNS(null, "frame", V);
|
||||
}
|
||||
|
||||
get rules() {
|
||||
@@ -268,7 +268,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("rules");
|
||||
const value = this.getAttributeNS(null, "rules");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'rules' property on 'HTMLTableElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("rules", V);
|
||||
this.setAttributeNS(null, "rules", V);
|
||||
}
|
||||
|
||||
get summary() {
|
||||
@@ -289,7 +289,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("summary");
|
||||
const value = this.getAttributeNS(null, "summary");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'summary' property on 'HTMLTableElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("summary", V);
|
||||
this.setAttributeNS(null, "summary", V);
|
||||
}
|
||||
|
||||
get width() {
|
||||
@@ -310,7 +310,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("width");
|
||||
const value = this.getAttributeNS(null, "width");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLTableElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", V);
|
||||
this.setAttributeNS(null, "width", V);
|
||||
}
|
||||
|
||||
get bgColor() {
|
||||
@@ -331,7 +331,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("bgColor");
|
||||
const value = this.getAttributeNS(null, "bgcolor");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("bgColor", V);
|
||||
this.setAttributeNS(null, "bgcolor", V);
|
||||
}
|
||||
|
||||
get cellPadding() {
|
||||
@@ -353,7 +353,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("cellPadding");
|
||||
const value = this.getAttributeNS(null, "cellpadding");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("cellPadding", V);
|
||||
this.setAttributeNS(null, "cellpadding", V);
|
||||
}
|
||||
|
||||
get cellSpacing() {
|
||||
@@ -375,7 +375,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("cellSpacing");
|
||||
const value = this.getAttributeNS(null, "cellspacing");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ class HTMLTableElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("cellSpacing", V);
|
||||
this.setAttributeNS(null, "cellspacing", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLTableElement.prototype, {
|
||||
|
20
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js
generated
vendored
20
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js
generated
vendored
@@ -84,7 +84,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLTableRowElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get ch() {
|
||||
@@ -105,7 +105,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("char");
|
||||
const value = this.getAttributeNS(null, "char");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'ch' property on 'HTMLTableRowElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("char", V);
|
||||
this.setAttributeNS(null, "char", V);
|
||||
}
|
||||
|
||||
get chOff() {
|
||||
@@ -126,7 +126,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("charoff");
|
||||
const value = this.getAttributeNS(null, "charoff");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'chOff' property on 'HTMLTableRowElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("charoff", V);
|
||||
this.setAttributeNS(null, "charoff", V);
|
||||
}
|
||||
|
||||
get vAlign() {
|
||||
@@ -147,7 +147,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("vAlign");
|
||||
const value = this.getAttributeNS(null, "valign");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'vAlign' property on 'HTMLTableRowElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("vAlign", V);
|
||||
this.setAttributeNS(null, "valign", V);
|
||||
}
|
||||
|
||||
get bgColor() {
|
||||
@@ -168,7 +168,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("bgColor");
|
||||
const value = this.getAttributeNS(null, "bgcolor");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ class HTMLTableRowElement extends HTMLElement.interface {
|
||||
treatNullAsEmptyString: true
|
||||
});
|
||||
|
||||
this.setAttribute("bgColor", V);
|
||||
this.setAttributeNS(null, "bgcolor", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLTableRowElement.prototype, {
|
||||
|
16
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js
generated
vendored
16
node_modules/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js
generated
vendored
@@ -68,7 +68,7 @@ class HTMLTableSectionElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("align");
|
||||
const value = this.getAttributeNS(null, "align");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class HTMLTableSectionElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'align' property on 'HTMLTableSectionElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("align", V);
|
||||
this.setAttributeNS(null, "align", V);
|
||||
}
|
||||
|
||||
get ch() {
|
||||
@@ -89,7 +89,7 @@ class HTMLTableSectionElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("char");
|
||||
const value = this.getAttributeNS(null, "char");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class HTMLTableSectionElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'ch' property on 'HTMLTableSectionElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("char", V);
|
||||
this.setAttributeNS(null, "char", V);
|
||||
}
|
||||
|
||||
get chOff() {
|
||||
@@ -110,7 +110,7 @@ class HTMLTableSectionElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("charoff");
|
||||
const value = this.getAttributeNS(null, "charoff");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ class HTMLTableSectionElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'chOff' property on 'HTMLTableSectionElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("charoff", V);
|
||||
this.setAttributeNS(null, "charoff", V);
|
||||
}
|
||||
|
||||
get vAlign() {
|
||||
@@ -131,7 +131,7 @@ class HTMLTableSectionElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("vAlign");
|
||||
const value = this.getAttributeNS(null, "valign");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ class HTMLTableSectionElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'vAlign' property on 'HTMLTableSectionElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("vAlign", V);
|
||||
this.setAttributeNS(null, "valign", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLTableSectionElement.prototype, {
|
||||
|
56
node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js
generated
vendored
56
node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js
generated
vendored
@@ -191,7 +191,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("autocomplete");
|
||||
const value = this.getAttributeNS(null, "autocomplete");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'autocomplete' property on 'HTMLTextAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("autocomplete", V);
|
||||
this.setAttributeNS(null, "autocomplete", V);
|
||||
}
|
||||
|
||||
get autofocus() {
|
||||
@@ -212,7 +212,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("autofocus");
|
||||
return this.hasAttributeNS(null, "autofocus");
|
||||
}
|
||||
|
||||
set autofocus(V) {
|
||||
@@ -225,9 +225,9 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("autofocus", "");
|
||||
this.setAttributeNS(null, "autofocus", "");
|
||||
} else {
|
||||
this.removeAttribute("autofocus");
|
||||
this.removeAttributeNS(null, "autofocus");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("dirName");
|
||||
const value = this.getAttributeNS(null, "dirname");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'dirName' property on 'HTMLTextAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("dirName", V);
|
||||
this.setAttributeNS(null, "dirname", V);
|
||||
}
|
||||
|
||||
get disabled() {
|
||||
@@ -277,7 +277,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("disabled");
|
||||
return this.hasAttributeNS(null, "disabled");
|
||||
}
|
||||
|
||||
set disabled(V) {
|
||||
@@ -290,9 +290,9 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("disabled", "");
|
||||
this.setAttributeNS(null, "disabled", "");
|
||||
} else {
|
||||
this.removeAttribute("disabled");
|
||||
this.removeAttributeNS(null, "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("inputMode");
|
||||
const value = this.getAttributeNS(null, "inputmode");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'inputMode' property on 'HTMLTextAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("inputMode", V);
|
||||
this.setAttributeNS(null, "inputmode", V);
|
||||
}
|
||||
|
||||
get maxLength() {
|
||||
@@ -330,7 +330,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("maxLength"));
|
||||
const value = parseInt(this.getAttributeNS(null, "maxlength"));
|
||||
return isNaN(value) || value < -2147483648 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'maxLength' property on 'HTMLTextAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("maxLength", String(V));
|
||||
this.setAttributeNS(null, "maxlength", String(V));
|
||||
}
|
||||
|
||||
get minLength() {
|
||||
@@ -351,7 +351,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("minLength"));
|
||||
const value = parseInt(this.getAttributeNS(null, "minlength"));
|
||||
return isNaN(value) || value < -2147483648 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'minLength' property on 'HTMLTextAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("minLength", String(V));
|
||||
this.setAttributeNS(null, "minlength", String(V));
|
||||
}
|
||||
|
||||
get name() {
|
||||
@@ -372,7 +372,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("name");
|
||||
const value = this.getAttributeNS(null, "name");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'name' property on 'HTMLTextAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("name", V);
|
||||
this.setAttributeNS(null, "name", V);
|
||||
}
|
||||
|
||||
get placeholder() {
|
||||
@@ -393,7 +393,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("placeholder");
|
||||
const value = this.getAttributeNS(null, "placeholder");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'placeholder' property on 'HTMLTextAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("placeholder", V);
|
||||
this.setAttributeNS(null, "placeholder", V);
|
||||
}
|
||||
|
||||
get readOnly() {
|
||||
@@ -414,7 +414,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("readOnly");
|
||||
return this.hasAttributeNS(null, "readonly");
|
||||
}
|
||||
|
||||
set readOnly(V) {
|
||||
@@ -427,9 +427,9 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("readOnly", "");
|
||||
this.setAttributeNS(null, "readonly", "");
|
||||
} else {
|
||||
this.removeAttribute("readOnly");
|
||||
this.removeAttributeNS(null, "readonly");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("required");
|
||||
return this.hasAttributeNS(null, "required");
|
||||
}
|
||||
|
||||
set required(V) {
|
||||
@@ -451,9 +451,9 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("required", "");
|
||||
this.setAttributeNS(null, "required", "");
|
||||
} else {
|
||||
this.removeAttribute("required");
|
||||
this.removeAttributeNS(null, "required");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,7 +482,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("wrap");
|
||||
const value = this.getAttributeNS(null, "wrap");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ class HTMLTextAreaElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'wrap' property on 'HTMLTextAreaElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("wrap", V);
|
||||
this.setAttributeNS(null, "wrap", V);
|
||||
}
|
||||
|
||||
get type() {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLTimeElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("dateTime");
|
||||
const value = this.getAttributeNS(null, "datetime");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLTimeElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'dateTime' property on 'HTMLTimeElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("dateTime", V);
|
||||
this.setAttributeNS(null, "datetime", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLTimeElement.prototype, {
|
||||
|
18
node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js
generated
vendored
18
node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLTrackElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("kind");
|
||||
const value = this.getAttributeNS(null, "kind");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLTrackElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'kind' property on 'HTMLTrackElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("kind", V);
|
||||
this.setAttributeNS(null, "kind", V);
|
||||
}
|
||||
|
||||
get src() {
|
||||
@@ -57,7 +57,7 @@ class HTMLTrackElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("srclang");
|
||||
const value = this.getAttributeNS(null, "srclang");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class HTMLTrackElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'srclang' property on 'HTMLTrackElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("srclang", V);
|
||||
this.setAttributeNS(null, "srclang", V);
|
||||
}
|
||||
|
||||
get label() {
|
||||
@@ -78,7 +78,7 @@ class HTMLTrackElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("label");
|
||||
const value = this.getAttributeNS(null, "label");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class HTMLTrackElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'label' property on 'HTMLTrackElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("label", V);
|
||||
this.setAttributeNS(null, "label", V);
|
||||
}
|
||||
|
||||
get default() {
|
||||
@@ -99,7 +99,7 @@ class HTMLTrackElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("default");
|
||||
return this.hasAttributeNS(null, "default");
|
||||
}
|
||||
|
||||
set default(V) {
|
||||
@@ -112,9 +112,9 @@ class HTMLTrackElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("default", "");
|
||||
this.setAttributeNS(null, "default", "");
|
||||
} else {
|
||||
this.removeAttribute("default");
|
||||
this.removeAttributeNS(null, "default");
|
||||
}
|
||||
}
|
||||
|
||||
|
10
node_modules/jsdom/lib/jsdom/living/generated/HTMLUListElement.js
generated
vendored
10
node_modules/jsdom/lib/jsdom/living/generated/HTMLUListElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLUListElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("compact");
|
||||
return this.hasAttributeNS(null, "compact");
|
||||
}
|
||||
|
||||
set compact(V) {
|
||||
@@ -29,9 +29,9 @@ class HTMLUListElement extends HTMLElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("compact", "");
|
||||
this.setAttributeNS(null, "compact", "");
|
||||
} else {
|
||||
this.removeAttribute("compact");
|
||||
this.removeAttributeNS(null, "compact");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class HTMLUListElement extends HTMLElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = this.getAttribute("type");
|
||||
const value = this.getAttributeNS(null, "type");
|
||||
return value === null ? "" : value;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class HTMLUListElement extends HTMLElement.interface {
|
||||
context: "Failed to set the 'type' property on 'HTMLUListElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("type", V);
|
||||
this.setAttributeNS(null, "type", V);
|
||||
}
|
||||
}
|
||||
Object.defineProperties(HTMLUListElement.prototype, {
|
||||
|
14
node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js
generated
vendored
14
node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js
generated
vendored
@@ -16,7 +16,7 @@ class HTMLVideoElement extends HTMLMediaElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("width"));
|
||||
const value = parseInt(this.getAttributeNS(null, "width"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class HTMLVideoElement extends HTMLMediaElement.interface {
|
||||
context: "Failed to set the 'width' property on 'HTMLVideoElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("width", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "width", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get height() {
|
||||
@@ -37,7 +37,7 @@ class HTMLVideoElement extends HTMLMediaElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
const value = parseInt(this.getAttribute("height"));
|
||||
const value = parseInt(this.getAttributeNS(null, "height"));
|
||||
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class HTMLVideoElement extends HTMLMediaElement.interface {
|
||||
context: "Failed to set the 'height' property on 'HTMLVideoElement': The provided value"
|
||||
});
|
||||
|
||||
this.setAttribute("height", String(V > 2147483647 ? 0 : V));
|
||||
this.setAttributeNS(null, "height", String(V > 2147483647 ? 0 : V));
|
||||
}
|
||||
|
||||
get videoWidth() {
|
||||
@@ -94,7 +94,7 @@ class HTMLVideoElement extends HTMLMediaElement.interface {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this.hasAttribute("playsInline");
|
||||
return this.hasAttributeNS(null, "playsinline");
|
||||
}
|
||||
|
||||
set playsInline(V) {
|
||||
@@ -107,9 +107,9 @@ class HTMLVideoElement extends HTMLMediaElement.interface {
|
||||
});
|
||||
|
||||
if (V) {
|
||||
this.setAttribute("playsInline", "");
|
||||
this.setAttributeNS(null, "playsinline", "");
|
||||
} else {
|
||||
this.removeAttribute("playsInline");
|
||||
this.removeAttributeNS(null, "playsinline");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
122
node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEvent.js
generated
vendored
Normal file
122
node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEvent.js
generated
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
"use strict";
|
||||
|
||||
const conversions = require("webidl-conversions");
|
||||
const utils = require("./utils.js");
|
||||
|
||||
const convertPageTransitionEventInit = require("./PageTransitionEventInit.js").convert;
|
||||
const impl = utils.implSymbol;
|
||||
const Event = require("./Event.js");
|
||||
|
||||
class PageTransitionEvent extends Event.interface {
|
||||
constructor(type) {
|
||||
if (arguments.length < 1) {
|
||||
throw new TypeError(
|
||||
"Failed to construct 'PageTransitionEvent': 1 argument required, but only " + arguments.length + " present."
|
||||
);
|
||||
}
|
||||
const args = [];
|
||||
{
|
||||
let curArg = arguments[0];
|
||||
curArg = conversions["DOMString"](curArg, { context: "Failed to construct 'PageTransitionEvent': parameter 1" });
|
||||
args.push(curArg);
|
||||
}
|
||||
{
|
||||
let curArg = arguments[1];
|
||||
curArg = convertPageTransitionEventInit(curArg, {
|
||||
context: "Failed to construct 'PageTransitionEvent': parameter 2"
|
||||
});
|
||||
args.push(curArg);
|
||||
}
|
||||
return iface.setup(Object.create(new.target.prototype), args);
|
||||
}
|
||||
|
||||
get persisted() {
|
||||
if (!this || !module.exports.is(this)) {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
|
||||
return this[impl]["persisted"];
|
||||
}
|
||||
}
|
||||
Object.defineProperties(PageTransitionEvent.prototype, {
|
||||
persisted: { enumerable: true },
|
||||
[Symbol.toStringTag]: { value: "PageTransitionEvent", configurable: true }
|
||||
});
|
||||
const iface = {
|
||||
// When an interface-module that implements this interface as a mixin is loaded, it will append its own `.is()`
|
||||
// method into this array. It allows objects that directly implements *those* interfaces to be recognized as
|
||||
// implementing this mixin interface.
|
||||
_mixedIntoPredicates: [],
|
||||
is(obj) {
|
||||
if (obj) {
|
||||
if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) {
|
||||
return true;
|
||||
}
|
||||
for (const isMixedInto of module.exports._mixedIntoPredicates) {
|
||||
if (isMixedInto(obj)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
isImpl(obj) {
|
||||
if (obj) {
|
||||
if (obj instanceof Impl.implementation) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const wrapper = utils.wrapperForImpl(obj);
|
||||
for (const isMixedInto of module.exports._mixedIntoPredicates) {
|
||||
if (isMixedInto(wrapper)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
convert(obj, { context = "The provided value" } = {}) {
|
||||
if (module.exports.is(obj)) {
|
||||
return utils.implForWrapper(obj);
|
||||
}
|
||||
throw new TypeError(`${context} is not of type 'PageTransitionEvent'.`);
|
||||
},
|
||||
|
||||
create(constructorArgs, privateData) {
|
||||
let obj = Object.create(PageTransitionEvent.prototype);
|
||||
obj = this.setup(obj, constructorArgs, privateData);
|
||||
return obj;
|
||||
},
|
||||
createImpl(constructorArgs, privateData) {
|
||||
let obj = Object.create(PageTransitionEvent.prototype);
|
||||
obj = this.setup(obj, constructorArgs, privateData);
|
||||
return utils.implForWrapper(obj);
|
||||
},
|
||||
_internalSetup(obj) {
|
||||
Event._internalSetup(obj);
|
||||
},
|
||||
setup(obj, constructorArgs, privateData) {
|
||||
if (!privateData) privateData = {};
|
||||
|
||||
privateData.wrapper = obj;
|
||||
|
||||
this._internalSetup(obj);
|
||||
Object.defineProperty(obj, impl, {
|
||||
value: new Impl.implementation(constructorArgs, privateData),
|
||||
configurable: true
|
||||
});
|
||||
|
||||
obj[impl][utils.wrapperSymbol] = obj;
|
||||
if (Impl.init) {
|
||||
Impl.init(obj[impl], privateData);
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
interface: PageTransitionEvent,
|
||||
expose: {
|
||||
Window: { PageTransitionEvent }
|
||||
}
|
||||
}; // iface
|
||||
module.exports = iface;
|
||||
|
||||
const Impl = require("../events/PageTransitionEvent-impl.js");
|
34
node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEventInit.js
generated
vendored
Normal file
34
node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEventInit.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
|
||||
const conversions = require("webidl-conversions");
|
||||
const utils = require("./utils.js");
|
||||
|
||||
const EventInit = require("./EventInit.js");
|
||||
|
||||
module.exports = {
|
||||
convertInherit(obj, ret, { context = "The provided value" } = {}) {
|
||||
EventInit.convertInherit(obj, ret, { context });
|
||||
|
||||
{
|
||||
const key = "persisted";
|
||||
let value = obj === undefined || obj === null ? undefined : obj[key];
|
||||
if (value !== undefined) {
|
||||
value = conversions["boolean"](value, { context: context + " has member persisted that" });
|
||||
|
||||
ret[key] = value;
|
||||
} else {
|
||||
ret[key] = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
convert(obj, { context = "The provided value" } = {}) {
|
||||
if (obj !== undefined && typeof obj !== "object" && typeof obj !== "function") {
|
||||
throw new TypeError(`${context} is not an object.`);
|
||||
}
|
||||
|
||||
const ret = Object.create(null);
|
||||
module.exports.convertInherit(obj, ret, { context });
|
||||
return ret;
|
||||
}
|
||||
};
|
2
node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js
generated
vendored
2
node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js
generated
vendored
@@ -46,7 +46,7 @@ function frozenBaseURL(baseElement, fallbackBaseURL) {
|
||||
// https://html.spec.whatwg.org/multipage/semantics.html#frozen-base-url
|
||||
// The spec is eager (setting the frozen base URL when things change); we are lazy (getting it when we need to)
|
||||
|
||||
const baseHrefAttribute = baseElement.getAttribute("href");
|
||||
const baseHrefAttribute = baseElement.getAttributeNS(null, "href");
|
||||
const result = whatwgURL.parseURL(baseHrefAttribute, { baseURL: fallbackBaseURL });
|
||||
return result === null ? fallbackBaseURL : result;
|
||||
}
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/helpers/focusing.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/helpers/focusing.js
generated
vendored
@@ -22,7 +22,7 @@ exports.isFocusableAreaElement = elImpl => {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Number.isNaN(parseInt(elImpl.getAttribute("tabindex")))) {
|
||||
if (!Number.isNaN(parseInt(elImpl.getAttributeNS(null, "tabindex")))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ exports.isFocusableAreaElement = elImpl => {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (elImpl._localName === "a" && elImpl.hasAttribute("href")) {
|
||||
if (elImpl._localName === "a" && elImpl.hasAttributeNS(null, "href")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
10
node_modules/jsdom/lib/jsdom/living/helpers/form-controls.js
generated
vendored
10
node_modules/jsdom/lib/jsdom/living/helpers/form-controls.js
generated
vendored
@@ -29,14 +29,14 @@ const submittableLocalNames = new Set(["button", "input", "keygen", "object", "s
|
||||
exports.isDisabled = formControl => {
|
||||
if (formControl.localName === "button" || formControl.localName === "input" || formControl.localName === "select" ||
|
||||
formControl.localName === "textarea") {
|
||||
if (formControl.hasAttribute("disabled")) {
|
||||
if (formControl.hasAttributeNS(null, "disabled")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
let e = formControl.parentNode;
|
||||
while (e) {
|
||||
if (e.localName === "fieldset" && e.hasAttribute("disabled")) {
|
||||
if (e.localName === "fieldset" && e.hasAttributeNS(null, "disabled")) {
|
||||
const firstLegendElementChild = firstChildWithLocalName(e, "legend");
|
||||
if (!firstLegendElementChild || !firstLegendElementChild.contains(formControl)) {
|
||||
return true;
|
||||
@@ -159,7 +159,7 @@ exports.sanitizeValueByType = (input, val) => {
|
||||
case "email":
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#e-mail-state-(type=email):value-sanitization-algorithm
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#e-mail-state-(type=email):value-sanitization-algorithm-2
|
||||
if (input.hasAttribute("multiple")) {
|
||||
if (input.hasAttributeNS(null, "multiple")) {
|
||||
val = val.split(",").map(token => stripLeadingAndTrailingASCIIWhitespace(token)).join(",");
|
||||
} else {
|
||||
val = stripNewlines(val);
|
||||
@@ -227,7 +227,7 @@ exports.sanitizeValueByType = (input, val) => {
|
||||
// https://github.com/whatwg/html/issues/4050 for some discussion.
|
||||
|
||||
exports.formOwner = formControl => {
|
||||
const formAttr = formControl.getAttribute("form");
|
||||
const formAttr = formControl.getAttributeNS(null, "form");
|
||||
if (formAttr === "") {
|
||||
return null;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ exports.formOwner = formControl => {
|
||||
let firstElementWithId;
|
||||
for (const descendant of domSymbolTree.treeIterator(root)) {
|
||||
if (descendant.nodeType === NODE_TYPE.ELEMENT_NODE &&
|
||||
descendant.getAttribute("id") === formAttr) {
|
||||
descendant.getAttributeNS(null, "id") === formAttr) {
|
||||
firstElementWithId = descendant;
|
||||
break;
|
||||
}
|
||||
|
28
node_modules/jsdom/lib/jsdom/living/helpers/html.js
generated
vendored
28
node_modules/jsdom/lib/jsdom/living/helpers/html.js
generated
vendored
@@ -1,28 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
const { domSymbolTree } = require("../helpers/internal-constants");
|
||||
|
||||
function clearChildNodes(node) {
|
||||
for (let child = domSymbolTree.firstChild(node); child; child = domSymbolTree.firstChild(node)) {
|
||||
node.removeChild(child);
|
||||
}
|
||||
}
|
||||
|
||||
function setInnerHTML(document, node, html) {
|
||||
// Clear the children first:
|
||||
if (node._templateContents) {
|
||||
clearChildNodes(node._templateContents);
|
||||
} else {
|
||||
clearChildNodes(node);
|
||||
}
|
||||
|
||||
if (node.nodeName === "#document") {
|
||||
document._htmlToDom.appendToDocument(html, node);
|
||||
} else {
|
||||
document._htmlToDom.appendToNode(html, node);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
setInnerHTML
|
||||
};
|
4
node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js
generated
vendored
@@ -60,8 +60,8 @@ function fetchStylesheetInternal(elementImpl, urlString, parsedURL) {
|
||||
let defaultEncoding = document._encoding;
|
||||
const resourceLoader = document._resourceLoader;
|
||||
|
||||
if (elementImpl.localName === "link" && elementImpl.hasAttribute("charset")) {
|
||||
defaultEncoding = whatwgEncoding.labelToName(elementImpl.getAttribute("charset"));
|
||||
if (elementImpl.localName === "link" && elementImpl.hasAttributeNS(null, "charset")) {
|
||||
defaultEncoding = whatwgEncoding.labelToName(elementImpl.getAttributeNS(null, "charset"));
|
||||
}
|
||||
|
||||
function onStylesheetLoad(data) {
|
||||
|
2
node_modules/jsdom/lib/jsdom/living/index.js
generated
vendored
2
node_modules/jsdom/lib/jsdom/living/index.js
generated
vendored
@@ -38,6 +38,7 @@ exports.UIEvent = require("./generated/UIEvent").interface;
|
||||
exports.MouseEvent = require("./generated/MouseEvent").interface;
|
||||
exports.KeyboardEvent = require("./generated/KeyboardEvent").interface;
|
||||
exports.TouchEvent = require("./generated/TouchEvent").interface;
|
||||
exports.PageTransitionEvent = require("./generated/PageTransitionEvent").interface;
|
||||
exports.ProgressEvent = require("./generated/ProgressEvent").interface;
|
||||
exports.StorageEvent = require("./generated/StorageEvent").interface;
|
||||
exports.CompositionEvent = require("./generated/CompositionEvent").interface;
|
||||
@@ -45,6 +46,7 @@ exports.WheelEvent = require("./generated/WheelEvent").interface;
|
||||
exports.EventTarget = require("./generated/EventTarget").interface;
|
||||
|
||||
exports.BarProp = require("./generated/BarProp").interface;
|
||||
exports.External = require("./generated/External").interface;
|
||||
exports.Location = require("./generated/Location").interface;
|
||||
exports.History = require("./generated/History").interface;
|
||||
exports.Screen = require("./generated/Screen").interface;
|
||||
|
18
node_modules/jsdom/lib/jsdom/living/named-properties-window.js
generated
vendored
18
node_modules/jsdom/lib/jsdom/living/named-properties-window.js
generated
vendored
@@ -38,9 +38,9 @@ function namedPropertyResolver(window, name, values) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (node.getAttribute("id") === name) {
|
||||
if (node.getAttributeNS(null, "id") === name) {
|
||||
results.push(node);
|
||||
} else if (node.getAttribute("name") === name && isNamedPropertyElement(node)) {
|
||||
} else if (node.getAttributeNS(null, "name") === name && isNamedPropertyElement(node)) {
|
||||
results.push(node);
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ function namedPropertyResolver(window, name, values) {
|
||||
const node = objects[i];
|
||||
|
||||
if ("contentWindow" in node && !hasOwnProp.call(node, "contentWindow") &&
|
||||
node.getAttribute("name") === name) {
|
||||
node.getAttributeNS(null, "name") === name) {
|
||||
return node.contentWindow;
|
||||
}
|
||||
}
|
||||
@@ -93,11 +93,11 @@ exports.elementAttributeModified = function (element, name, value, oldValue) {
|
||||
|
||||
// (tracker will be null if the document has no Window)
|
||||
if (tracker) {
|
||||
if (name === "id" && (!useName || element.getAttribute("name") !== oldValue)) {
|
||||
if (name === "id" && (!useName || element.getAttributeNS(null, "name") !== oldValue)) {
|
||||
tracker.untrack(oldValue, element);
|
||||
}
|
||||
|
||||
if (name === "name" && element.getAttribute("id") !== oldValue) {
|
||||
if (name === "name" && element.getAttributeNS(null, "id") !== oldValue) {
|
||||
tracker.untrack(oldValue, element);
|
||||
}
|
||||
|
||||
@@ -116,10 +116,10 @@ exports.nodeAttachedToDocument = function (node) {
|
||||
return;
|
||||
}
|
||||
|
||||
tracker.track(node.getAttribute("id"), node);
|
||||
tracker.track(node.getAttributeNS(null, "id"), node);
|
||||
|
||||
if (isNamedPropertyElement(node)) {
|
||||
tracker.track(node.getAttribute("name"), node);
|
||||
tracker.track(node.getAttributeNS(null, "name"), node);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -133,9 +133,9 @@ exports.nodeDetachedFromDocument = function (node) {
|
||||
return;
|
||||
}
|
||||
|
||||
tracker.untrack(node.getAttribute("id"), node);
|
||||
tracker.untrack(node.getAttributeNS(null, "id"), node);
|
||||
|
||||
if (isNamedPropertyElement(node)) {
|
||||
tracker.untrack(node.getAttribute("name"), node);
|
||||
tracker.untrack(node.getAttributeNS(null, "name"), node);
|
||||
}
|
||||
};
|
||||
|
16
node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js
generated
vendored
16
node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js
generated
vendored
@@ -16,7 +16,7 @@ const { asciiLowercase, stripAndCollapseASCIIWhitespace } = require("../helpers/
|
||||
const { childTextContent } = require("../helpers/text");
|
||||
const { HTML_NS, SVG_NS } = require("../helpers/namespaces");
|
||||
const DOMException = require("domexception");
|
||||
const HTMLToDOM = require("../../browser/htmltodom");
|
||||
const { parseIntoDocument } = require("../../browser/parser");
|
||||
const History = require("../generated/History");
|
||||
const Location = require("../generated/Location");
|
||||
const HTMLCollection = require("../generated/HTMLCollection");
|
||||
@@ -128,7 +128,6 @@ class DocumentImpl extends NodeImpl {
|
||||
}
|
||||
|
||||
this._parsingMode = privateData.options.parsingMode;
|
||||
this._htmlToDom = new HTMLToDOM(privateData.options.parsingMode);
|
||||
|
||||
this._implementation = DOMImplementation.createImpl([], {
|
||||
ownerDocument: this
|
||||
@@ -140,6 +139,7 @@ class DocumentImpl extends NodeImpl {
|
||||
this._ids = Object.create(null);
|
||||
this._attached = true;
|
||||
this._currentScript = null;
|
||||
this._pageShowingFlag = false;
|
||||
this._cookieJar = privateData.options.cookieJar;
|
||||
this._parseOptions = privateData.options.parseOptions;
|
||||
this._scriptingDisabled = privateData.options.scriptingDisabled;
|
||||
@@ -324,6 +324,8 @@ class DocumentImpl extends NodeImpl {
|
||||
this.styleSheets.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
super._descendantRemoved.apply(this, arguments);
|
||||
}
|
||||
|
||||
write() {
|
||||
@@ -367,11 +369,11 @@ class DocumentImpl extends NodeImpl {
|
||||
node.innerHTML = text;
|
||||
} else {
|
||||
clearChildNodes(this);
|
||||
this._htmlToDom.appendToDocument(text, this);
|
||||
parseIntoDocument(text, this);
|
||||
}
|
||||
} else if (text) {
|
||||
clearChildNodes(this);
|
||||
this._htmlToDom.appendToDocument(text, this);
|
||||
parseIntoDocument(text, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,7 +420,7 @@ class DocumentImpl extends NodeImpl {
|
||||
element: this,
|
||||
query: () => domSymbolTree.treeToArray(this, {
|
||||
filter: node => (node._localName === "a" || node._localName === "area") &&
|
||||
node.hasAttribute("href") &&
|
||||
node.hasAttributeNS(null, "href") &&
|
||||
node._namespaceURI === HTML_NS
|
||||
})
|
||||
});
|
||||
@@ -434,7 +436,7 @@ class DocumentImpl extends NodeImpl {
|
||||
element: this,
|
||||
query: () => domSymbolTree.treeToArray(this, {
|
||||
filter: node => node._localName === "a" &&
|
||||
node.hasAttribute("name") &&
|
||||
node.hasAttributeNS(null, "name") &&
|
||||
node._namespaceURI === HTML_NS
|
||||
})
|
||||
});
|
||||
@@ -529,7 +531,7 @@ class DocumentImpl extends NodeImpl {
|
||||
return NodeList.createImpl([], {
|
||||
element: this,
|
||||
query: () => domSymbolTree.treeToArray(this, {
|
||||
filter: node => node.getAttribute && node.getAttribute("name") === elementName
|
||||
filter: node => node.getAttributeNS && node.getAttributeNS(null, "name") === elementName
|
||||
})
|
||||
});
|
||||
}
|
||||
|
81
node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js
generated
vendored
81
node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js
generated
vendored
@@ -9,6 +9,7 @@ const ChildNodeImpl = require("./ChildNode-impl").implementation;
|
||||
const attributes = require("../attributes");
|
||||
const namedPropertiesWindow = require("../named-properties-window");
|
||||
const NODE_TYPE = require("../node-type");
|
||||
const { parseFragment } = require("../../browser/parser");
|
||||
const { fragmentSerialization } = require("../domparsing/serialization");
|
||||
const { domSymbolTree } = require("../helpers/internal-constants");
|
||||
const DOMException = require("domexception");
|
||||
@@ -17,8 +18,7 @@ const attrGenerated = require("../generated/Attr");
|
||||
const NamedNodeMap = require("../generated/NamedNodeMap");
|
||||
const validateNames = require("../helpers/validate-names");
|
||||
const { asciiLowercase } = require("../helpers/strings");
|
||||
const { setInnerHTML } = require("../helpers/html");
|
||||
const { clone, listOfElementsWithQualifiedName, listOfElementsWithNamespaceAndLocalName,
|
||||
const { listOfElementsWithQualifiedName, listOfElementsWithNamespaceAndLocalName,
|
||||
listOfElementsWithClassNames } = require("../node");
|
||||
const SlotableMixinImpl = require("./Slotable-impl").implementation;
|
||||
const NonDocumentTypeChildNode = require("./NonDocumentTypeChildNode-impl").implementation;
|
||||
@@ -80,7 +80,7 @@ class ElementImpl extends NodeImpl {
|
||||
_attach() {
|
||||
namedPropertiesWindow.nodeAttachedToDocument(this);
|
||||
|
||||
const id = this.getAttribute("id");
|
||||
const id = this.getAttributeNS(null, "id");
|
||||
if (id) {
|
||||
attachId(id, this, this._ownerDocument);
|
||||
}
|
||||
@@ -93,7 +93,7 @@ class ElementImpl extends NodeImpl {
|
||||
|
||||
namedPropertiesWindow.nodeDetachedFromDocument(this);
|
||||
|
||||
const id = this.getAttribute("id");
|
||||
const id = this.getAttributeNS(null, "id");
|
||||
if (id) {
|
||||
detachId(id, this, this._ownerDocument);
|
||||
}
|
||||
@@ -141,58 +141,52 @@ class ElementImpl extends NodeImpl {
|
||||
return this._attributes;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/DOM-Parsing/#dom-element-outerhtml
|
||||
get outerHTML() {
|
||||
// TODO: maybe parse5 can give us a hook where it serializes the node itself too:
|
||||
// https://github.com/inikulin/parse5/issues/230
|
||||
// Alternatively, if we can create a virtual node in domSymbolTree, that'd also work.
|
||||
// It's currently prevented by the fact that a node can't be duplicated in the same tree
|
||||
// It's currently prevented by the fact that a node can't be duplicated in the same tree.
|
||||
// Then we could get rid of all the code for childNodesForSerializing.
|
||||
return fragmentSerialization({ childNodesForSerializing: [this], _ownerDocument: this._ownerDocument }, {
|
||||
requireWellFormed: true
|
||||
});
|
||||
}
|
||||
|
||||
set outerHTML(html) {
|
||||
if (html === null) {
|
||||
html = "";
|
||||
}
|
||||
|
||||
const parent = domSymbolTree.parent(this);
|
||||
set outerHTML(markup) {
|
||||
let parent = domSymbolTree.parent(this);
|
||||
const document = this._ownerDocument;
|
||||
|
||||
if (!parent) {
|
||||
return;
|
||||
}
|
||||
|
||||
let contextElement;
|
||||
if (parent.nodeType === NODE_TYPE.DOCUMENT_NODE) {
|
||||
throw new DOMException("Modifications are not allowed for this document", "NoModificationAllowedError");
|
||||
} else if (parent.nodeType === NODE_TYPE.DOCUMENT_FRAGMENT_NODE) {
|
||||
contextElement = document.createElementNS(HTML_NS, "body");
|
||||
} else if (parent.nodeType === NODE_TYPE.ELEMENT_NODE) {
|
||||
contextElement = clone(parent, undefined, false);
|
||||
} else {
|
||||
throw new TypeError("This should never happen");
|
||||
}
|
||||
|
||||
document._htmlToDom.appendToNode(html, contextElement);
|
||||
|
||||
while (contextElement.firstChild) {
|
||||
parent.insertBefore(contextElement.firstChild, this);
|
||||
if (parent.nodeType === NODE_TYPE.DOCUMENT_FRAGMENT_NODE) {
|
||||
parent = document.createElementNS(HTML_NS, "body");
|
||||
}
|
||||
|
||||
parent.removeChild(this);
|
||||
const fragment = parseFragment(markup, parent);
|
||||
|
||||
const contextObjectParent = domSymbolTree.parent(this);
|
||||
contextObjectParent._replace(fragment, this);
|
||||
}
|
||||
|
||||
// https://w3c.github.io/DOM-Parsing/#dfn-innerhtml
|
||||
get innerHTML() {
|
||||
return fragmentSerialization(this, { requireWellFormed: true });
|
||||
}
|
||||
set innerHTML(markup) {
|
||||
const fragment = parseFragment(markup, this);
|
||||
|
||||
set innerHTML(html) {
|
||||
if (html === null) {
|
||||
html = "";
|
||||
let contextObject = this;
|
||||
if (this.localName === "template" && this.namespaceURI === HTML_NS) {
|
||||
contextObject = contextObject._templateContents;
|
||||
}
|
||||
|
||||
setInnerHTML(this.ownerDocument, this, html);
|
||||
contextObject._replaceAll(fragment);
|
||||
}
|
||||
|
||||
get classList() {
|
||||
@@ -250,6 +244,10 @@ class ElementImpl extends NodeImpl {
|
||||
setAttributeNS(namespace, name, value) {
|
||||
const extracted = validateNames.validateAndExtract(namespace, name);
|
||||
|
||||
// Because of widespread use of this method internally, e.g. to manually implement attribute/content reflection, we
|
||||
// centralize the conversion to a string here, so that all call sites don't have to do it.
|
||||
value = `${value}`;
|
||||
|
||||
attributes.setAttributeValue(this, extracted.localName, value, extracted.prefix, extracted.namespace);
|
||||
}
|
||||
|
||||
@@ -312,18 +310,22 @@ class ElementImpl extends NodeImpl {
|
||||
}
|
||||
|
||||
setAttributeNode(attr) {
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
return attributes.setAttribute(this, attr);
|
||||
}
|
||||
|
||||
setAttributeNodeNS(attr) {
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
return attributes.setAttribute(this, attr);
|
||||
}
|
||||
|
||||
removeAttributeNode(attr) {
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
if (!attributes.hasAttribute(this, attr)) {
|
||||
throw new DOMException("Tried to remove an attribute that was not present", "NotFoundError");
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-restricted-properties
|
||||
attributes.removeAttribute(this, attr);
|
||||
|
||||
return attr;
|
||||
@@ -475,25 +477,34 @@ class ElementImpl extends NodeImpl {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: use context for parsing instead of a <template>.
|
||||
const fragment = this.ownerDocument.createElement("template");
|
||||
fragment.innerHTML = text;
|
||||
if (
|
||||
context.nodeType !== NODE_TYPE.ELEMENT_NODE ||
|
||||
(
|
||||
context._ownerDocument._parsingMode === "html" &&
|
||||
context._localName === "html" &&
|
||||
context._namespaceURI === HTML_NS
|
||||
)
|
||||
) {
|
||||
context = context._ownerDocument.createElement("body");
|
||||
}
|
||||
|
||||
const fragment = parseFragment(text, context);
|
||||
|
||||
switch (position) {
|
||||
case "beforebegin": {
|
||||
this.parentNode._insert(fragment.content, this);
|
||||
this.parentNode._insert(fragment, this);
|
||||
break;
|
||||
}
|
||||
case "afterbegin": {
|
||||
this._insert(fragment.content, this.firstChild);
|
||||
this._insert(fragment, this.firstChild);
|
||||
break;
|
||||
}
|
||||
case "beforeend": {
|
||||
this._append(fragment.content);
|
||||
this._append(fragment);
|
||||
break;
|
||||
}
|
||||
case "afterend": {
|
||||
this.parentNode._insert(fragment.content, this.nextSibling);
|
||||
this.parentNode._insert(fragment, this.nextSibling);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
2
node_modules/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js
generated
vendored
2
node_modules/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js
generated
vendored
@@ -6,7 +6,7 @@ class ElementCSSInlineStyle {
|
||||
this._style = new cssstyle.CSSStyleDeclaration(newCssText => {
|
||||
if (!this._settingCssText) {
|
||||
this._settingCssText = true;
|
||||
this.setAttribute("style", newCssText);
|
||||
this.setAttributeNS(null, "style", newCssText);
|
||||
this._settingCssText = false;
|
||||
}
|
||||
});
|
||||
|
2
node_modules/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js
generated
vendored
2
node_modules/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js
generated
vendored
@@ -80,7 +80,7 @@ class GlobalEventHandlersImpl {
|
||||
return;
|
||||
}
|
||||
|
||||
const val = this.getAttribute(propName);
|
||||
const val = this.getAttributeNS(null, propName);
|
||||
const handler = val === null ? null : { body: val };
|
||||
this._setEventHandlerFor(event, handler);
|
||||
}
|
||||
|
6
node_modules/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js
generated
vendored
6
node_modules/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js
generated
vendored
@@ -9,6 +9,12 @@ class HTMLAnchorElementImpl extends HTMLElementImpl {
|
||||
super(args, privateData);
|
||||
|
||||
this._htmlHyperlinkElementUtilsSetup();
|
||||
|
||||
this._hasActivationBehavior = true;
|
||||
}
|
||||
|
||||
_activationBehavior() {
|
||||
this._followAHyperlink();
|
||||
}
|
||||
|
||||
get relList() {
|
||||
|
6
node_modules/jsdom/lib/jsdom/living/nodes/HTMLAndSVGElementShared-impl.js
generated
vendored
6
node_modules/jsdom/lib/jsdom/living/nodes/HTMLAndSVGElementShared-impl.js
generated
vendored
@@ -16,14 +16,14 @@ class HTMLAndSVGElementSharedImpl {
|
||||
|
||||
// TODO this should be [Reflect]able if we added default value support to webidl2js's [Reflect]
|
||||
get tabIndex() {
|
||||
if (!this.hasAttribute("tabindex")) {
|
||||
if (!this.hasAttributeNS(null, "tabindex")) {
|
||||
return focusing.isFocusableAreaElement(this) ? 0 : -1;
|
||||
}
|
||||
return conversions.long(this.getAttribute("tabindex"));
|
||||
return conversions.long(this.getAttributeNS(null, "tabindex"));
|
||||
}
|
||||
|
||||
set tabIndex(value) {
|
||||
this.setAttribute("tabindex", String(value));
|
||||
this.setAttributeNS(null, "tabindex", String(value));
|
||||
}
|
||||
|
||||
focus() {
|
||||
|
6
node_modules/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js
generated
vendored
6
node_modules/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js
generated
vendored
@@ -9,6 +9,12 @@ class HTMLAreaElementImpl extends HTMLElementImpl {
|
||||
super(args, privateData);
|
||||
|
||||
this._htmlHyperlinkElementUtilsSetup();
|
||||
|
||||
this._hasActivationBehavior = true;
|
||||
}
|
||||
|
||||
_activationBehavior() {
|
||||
this._followAHyperlink();
|
||||
}
|
||||
|
||||
get relList() {
|
||||
|
4
node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js
generated
vendored
4
node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js
generated
vendored
@@ -7,7 +7,7 @@ class HTMLBaseElementImpl extends HTMLElementImpl {
|
||||
get href() {
|
||||
const document = this._ownerDocument;
|
||||
|
||||
const url = this.hasAttribute("href") ? this.getAttribute("href") : "";
|
||||
const url = this.hasAttributeNS(null, "href") ? this.getAttributeNS(null, "href") : "";
|
||||
const parsed = whatwgURL.parseURL(url, { baseURL: fallbackBaseURL(document) });
|
||||
|
||||
if (parsed === null) {
|
||||
@@ -18,7 +18,7 @@ class HTMLBaseElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
set href(value) {
|
||||
this.setAttribute("href", value);
|
||||
this.setAttributeNS(null, "href", value);
|
||||
}
|
||||
}
|
||||
|
||||
|
8
node_modules/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js
generated
vendored
8
node_modules/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js
generated
vendored
@@ -29,7 +29,7 @@ class HTMLButtonElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
_getValue() {
|
||||
const valueAttr = this.getAttribute("value");
|
||||
const valueAttr = this.getAttributeNS(null, "value");
|
||||
return valueAttr === null ? "" : valueAttr;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class HTMLButtonElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
get type() {
|
||||
const typeAttr = (this.getAttribute("type") || "").toLowerCase();
|
||||
const typeAttr = (this.getAttributeNS(null, "type") || "").toLowerCase();
|
||||
switch (typeAttr) {
|
||||
case "submit":
|
||||
case "reset":
|
||||
@@ -59,10 +59,10 @@ class HTMLButtonElementImpl extends HTMLElementImpl {
|
||||
case "submit":
|
||||
case "reset":
|
||||
case "button":
|
||||
this.setAttribute("type", v);
|
||||
this.setAttributeNS(null, "type", v);
|
||||
break;
|
||||
default:
|
||||
this.setAttribute("type", "submit");
|
||||
this.setAttributeNS(null, "type", "submit");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
10
node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js
generated
vendored
10
node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js
generated
vendored
@@ -10,7 +10,7 @@ class HTMLCanvasElementImpl extends HTMLElementImpl {
|
||||
this._canvas[name] = parseInt(value);
|
||||
}
|
||||
|
||||
return super._attrModified.apply(this, arguments);
|
||||
super._attrModified.apply(this, arguments);
|
||||
}
|
||||
|
||||
_getCanvas() {
|
||||
@@ -88,23 +88,23 @@ class HTMLCanvasElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
get width() {
|
||||
const parsed = parseInt(this.getAttribute("width"));
|
||||
const parsed = parseInt(this.getAttributeNS(null, "width"));
|
||||
return isNaN(parsed) || parsed < 0 || parsed > 2147483647 ? 300 : parsed;
|
||||
}
|
||||
|
||||
set width(v) {
|
||||
v = v > 2147483647 ? 300 : v;
|
||||
this.setAttribute("width", String(v));
|
||||
this.setAttributeNS(null, "width", String(v));
|
||||
}
|
||||
|
||||
get height() {
|
||||
const parsed = parseInt(this.getAttribute("height"));
|
||||
const parsed = parseInt(this.getAttributeNS(null, "height"));
|
||||
return isNaN(parsed) || parsed < 0 || parsed > 2147483647 ? 150 : parsed;
|
||||
}
|
||||
|
||||
set height(v) {
|
||||
v = v > 2147483647 ? 150 : v;
|
||||
this.setAttribute("height", String(v));
|
||||
this.setAttributeNS(null, "height", String(v));
|
||||
}
|
||||
}
|
||||
|
||||
|
8
node_modules/jsdom/lib/jsdom/living/nodes/HTMLCollection-impl.js
generated
vendored
8
node_modules/jsdom/lib/jsdom/living/nodes/HTMLCollection-impl.js
generated
vendored
@@ -25,11 +25,11 @@ exports.implementation = class HTMLCollectionImpl {
|
||||
}
|
||||
this._update();
|
||||
for (const element of this._list) {
|
||||
if (element.getAttribute("id") === key) {
|
||||
if (element.getAttributeNS(null, "id") === key) {
|
||||
return element;
|
||||
}
|
||||
if (element._namespaceURI === HTML_NS) {
|
||||
const name = element.getAttribute("name");
|
||||
const name = element.getAttributeNS(null, "name");
|
||||
if (name === key) {
|
||||
return element;
|
||||
}
|
||||
@@ -55,12 +55,12 @@ exports.implementation = class HTMLCollectionImpl {
|
||||
this._update();
|
||||
const result = new Set();
|
||||
for (const element of this._list) {
|
||||
const id = element.getAttribute("id");
|
||||
const id = element.getAttributeNS(null, "id");
|
||||
if (id) {
|
||||
result.add(id);
|
||||
}
|
||||
if (element._namespaceURI === HTML_NS) {
|
||||
const name = element.getAttribute("name");
|
||||
const name = element.getAttributeNS(null, "name");
|
||||
if (name) {
|
||||
result.add(name);
|
||||
}
|
||||
|
13
node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js
generated
vendored
13
node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js
generated
vendored
@@ -1,8 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
const HTMLCollection = require("../generated/HTMLCollection");
|
||||
const HTMLElementImpl = require("./HTMLElement-impl").implementation;
|
||||
|
||||
class HTMLDataListElementImpl extends HTMLElementImpl { }
|
||||
const { descendantsByLocalName } = require("../helpers/traversal");
|
||||
|
||||
class HTMLDataListElementImpl extends HTMLElementImpl {
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-datalist-options
|
||||
get options() {
|
||||
return HTMLCollection.createImpl([], {
|
||||
element: this,
|
||||
query: () => descendantsByLocalName(this, "option")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
implementation: HTMLDataListElementImpl
|
||||
|
38
node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js
generated
vendored
38
node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js
generated
vendored
@@ -27,15 +27,21 @@ class HTMLElementImpl extends ElementImpl {
|
||||
const parent = this.parentNode;
|
||||
if (parent && parent._localName === "details" &&
|
||||
this === firstChildWithLocalName(parent, "summary")) {
|
||||
parent.toggleAttribute("open");
|
||||
if (parent.hasAttributeNS(null, "open")) {
|
||||
parent.removeAttributeNS(null, "open");
|
||||
} else {
|
||||
parent.setAttributeNS(null, "open", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
click() {
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#dom-click
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#run-synthetic-click-activation-steps
|
||||
// Not completely spec compliant due to e.g. incomplete implementations of disabled for form controls, or no
|
||||
// implementation at all of isTrusted.
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#fire-a-synthetic-mouse-event
|
||||
|
||||
if (isDisabled(this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._clickInProgress) {
|
||||
return;
|
||||
@@ -43,27 +49,21 @@ class HTMLElementImpl extends ElementImpl {
|
||||
|
||||
this._clickInProgress = true;
|
||||
|
||||
if (isDisabled(this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Run synthetic click activation steps. According to the spec,
|
||||
// this should not be calling dispatchEvent, but it matches browser behavior.
|
||||
// See: https://www.w3.org/Bugs/Public/show_bug.cgi?id=12230
|
||||
// See also: https://github.com/whatwg/html/issues/805
|
||||
// https://github.com/whatwg/html/issues/4451
|
||||
// https://github.com/whatwg/html/issues/4452
|
||||
fireAnEvent("click", this, MouseEvent, {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
composed: true,
|
||||
view: this.ownerDocument.defaultView,
|
||||
isTrusted: false
|
||||
isTrusted: false,
|
||||
view: this.ownerDocument.defaultView
|
||||
});
|
||||
|
||||
this._clickInProgress = false;
|
||||
}
|
||||
|
||||
get draggable() {
|
||||
const attributeValue = this.getAttribute("draggable");
|
||||
const attributeValue = this.getAttributeNS(null, "draggable");
|
||||
|
||||
if (attributeValue === "true") {
|
||||
return true;
|
||||
@@ -71,14 +71,14 @@ class HTMLElementImpl extends ElementImpl {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this._localName === "img" || (this._localName === "a" && this.hasAttribute("href"));
|
||||
return this._localName === "img" || (this._localName === "a" && this.hasAttributeNS(null, "href"));
|
||||
}
|
||||
set draggable(value) {
|
||||
this.setAttribute("draggable", String(value));
|
||||
this.setAttributeNS(null, "draggable", String(value));
|
||||
}
|
||||
|
||||
get dir() {
|
||||
let dirValue = this.getAttribute("dir");
|
||||
let dirValue = this.getAttributeNS(null, "dir");
|
||||
if (dirValue !== null) {
|
||||
dirValue = dirValue.toLowerCase();
|
||||
|
||||
@@ -89,7 +89,7 @@ class HTMLElementImpl extends ElementImpl {
|
||||
return "";
|
||||
}
|
||||
set dir(value) {
|
||||
this.setAttribute("dir", value);
|
||||
this.setAttributeNS(null, "dir", value);
|
||||
}
|
||||
|
||||
_attrModified(name, value, oldValue) {
|
||||
|
2
node_modules/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js
generated
vendored
2
node_modules/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js
generated
vendored
@@ -8,7 +8,7 @@ class HTMLEmbedElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
set src(value) {
|
||||
this.setAttribute("src", value);
|
||||
this.setAttributeNS(null, "src", value);
|
||||
}
|
||||
}
|
||||
|
||||
|
12
node_modules/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js
generated
vendored
12
node_modules/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js
generated
vendored
@@ -99,7 +99,7 @@ class HTMLFormElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
get method() {
|
||||
let method = this.getAttribute("method");
|
||||
let method = this.getAttributeNS(null, "method");
|
||||
if (method) {
|
||||
method = method.toLowerCase();
|
||||
}
|
||||
@@ -111,11 +111,11 @@ class HTMLFormElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
set method(V) {
|
||||
this.setAttribute("method", V);
|
||||
this.setAttributeNS(null, "method", V);
|
||||
}
|
||||
|
||||
get enctype() {
|
||||
let type = this.getAttribute("enctype");
|
||||
let type = this.getAttributeNS(null, "enctype");
|
||||
if (type) {
|
||||
type = type.toLowerCase();
|
||||
}
|
||||
@@ -127,11 +127,11 @@ class HTMLFormElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
set enctype(V) {
|
||||
this.setAttribute("enctype", V);
|
||||
this.setAttributeNS(null, "enctype", V);
|
||||
}
|
||||
|
||||
get action() {
|
||||
const attributeValue = this.getAttribute("action");
|
||||
const attributeValue = this.getAttributeNS(null, "action");
|
||||
if (attributeValue === null || attributeValue === "") {
|
||||
return this._ownerDocument.URL;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class HTMLFormElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
set action(V) {
|
||||
this.setAttribute("action", V);
|
||||
this.setAttributeNS(null, "action", V);
|
||||
}
|
||||
|
||||
// If the checkValidity() method is invoked, the user agent must statically validate the
|
||||
|
38
node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js
generated
vendored
38
node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js
generated
vendored
@@ -1,4 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const DOMException = require("domexception");
|
||||
const MIMEType = require("whatwg-mimetype");
|
||||
const whatwgEncoding = require("whatwg-encoding");
|
||||
const { parseURL, serializeURL } = require("whatwg-url");
|
||||
@@ -7,6 +9,7 @@ const sniffHTMLEncoding = require("html-encoding-sniffer");
|
||||
const { evaluateJavaScriptURL } = require("../window/navigation");
|
||||
const HTMLElementImpl = require("./HTMLElement-impl").implementation;
|
||||
const { reflectURLAttribute } = require("../../utils");
|
||||
const { parseIntoDocument } = require("../../browser/parser");
|
||||
const { documentBaseURL } = require("../helpers/document-base-url");
|
||||
const { fireAnEvent } = require("../helpers/events");
|
||||
const { getAttributeValue } = require("../attributes");
|
||||
@@ -54,7 +57,29 @@ function fetchFrame(serializedURL, frame, document, contentDoc) {
|
||||
contentDoc._encoding = encoding;
|
||||
|
||||
const html = whatwgEncoding.decode(data, contentDoc._encoding);
|
||||
contentDoc._htmlToDom.appendToDocument(html, contentDoc);
|
||||
|
||||
try {
|
||||
parseIntoDocument(html, contentDoc);
|
||||
} catch (error) {
|
||||
if (
|
||||
error instanceof DOMException &&
|
||||
error.code === DOMException.SYNTAX_ERR &&
|
||||
contentDoc._parsingMode === "xml"
|
||||
) {
|
||||
// As defined (https://html.spec.whatwg.org/#read-xml) parsing error in XML document may be reported inline by
|
||||
// mutating the document.
|
||||
const element = contentDoc.createElementNS("http://www.mozilla.org/newlayout/xml/parsererror.xml", "parsererror");
|
||||
element.textContent = error.message;
|
||||
|
||||
while (contentDoc.childNodes.length > 0) {
|
||||
contentDoc.removeChild(contentDoc.lastChild);
|
||||
}
|
||||
contentDoc.appendChild(element);
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
contentDoc.close();
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -109,7 +134,8 @@ function loadFrame(frame, attaching) {
|
||||
pool: parentDoc._pool,
|
||||
encoding: parentDoc._encoding,
|
||||
runScripts: parentDoc._defaultView._runScripts,
|
||||
commonForOrigin: parentDoc._defaultView._commonForOrigin
|
||||
commonForOrigin: parentDoc._defaultView._commonForOrigin,
|
||||
pretendToBeVisual: parentDoc._defaultView._pretendToBeVisual
|
||||
});
|
||||
|
||||
const contentDoc = frame._contentDocument = idlUtils.implForWrapper(wnd._document);
|
||||
@@ -129,7 +155,7 @@ function loadFrame(frame, attaching) {
|
||||
// Handle about:blank with a simulated load of an empty document.
|
||||
if (serializedURL === "about:blank") {
|
||||
// Cannot be done inside the enqueued callback; the documentElement etc. need to be immediately available.
|
||||
contentDoc._htmlToDom.appendToDocument("<html><head></head><body></body></html>", contentDoc);
|
||||
parseIntoDocument("<html><head></head><body></body></html>", contentDoc);
|
||||
contentDoc.close(noQueue);
|
||||
|
||||
if (noQueue) {
|
||||
@@ -141,7 +167,7 @@ function loadFrame(frame, attaching) {
|
||||
}
|
||||
} else if (url.scheme === "javascript") {
|
||||
// Cannot be done inside the enqueued callback; the documentElement etc. need to be immediately available.
|
||||
contentDoc._htmlToDom.appendToDocument("<html><head></head><body></body></html>", contentDoc);
|
||||
parseIntoDocument("<html><head></head><body></body></html>", contentDoc);
|
||||
contentDoc.close(noQueue);
|
||||
const result = evaluateJavaScriptURL(contentWindow, url);
|
||||
if (typeof result === "string") {
|
||||
@@ -233,7 +259,7 @@ class HTMLFrameElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
set src(value) {
|
||||
this.setAttribute("src", value);
|
||||
this.setAttributeNS(null, "src", value);
|
||||
}
|
||||
|
||||
get longDesc() {
|
||||
@@ -241,7 +267,7 @@ class HTMLFrameElementImpl extends HTMLElementImpl {
|
||||
}
|
||||
|
||||
set longDesc(value) {
|
||||
this.setAttribute("longdesc", value);
|
||||
this.setAttributeNS(null, "longdesc", value);
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user