happy-dom
Advanced tools
Comparing version 14.6.0 to 14.6.1
@@ -610,3 +610,3 @@ import Element from '../element/Element.cjs'; | ||
*/ | ||
createTextNode(data?: string): Text; | ||
createTextNode(data: string): Text; | ||
/** | ||
@@ -613,0 +613,0 @@ * Creates a comment node. |
@@ -610,3 +610,3 @@ import Element from '../element/Element.js'; | ||
*/ | ||
createTextNode(data?: string): Text; | ||
createTextNode(data: string): Text; | ||
/** | ||
@@ -613,0 +613,0 @@ * Creates a comment node. |
@@ -833,3 +833,6 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
createTextNode(data) { | ||
return NodeFactory.createNode(this, this[PropertySymbol.ownerWindow].Text, data); | ||
if (arguments.length < 1) { | ||
throw new TypeError(`Failed to execute 'createTextNode' on 'Document': 1 argument required, but only ${arguments.length} present.`); | ||
} | ||
return NodeFactory.createNode(this, this[PropertySymbol.ownerWindow].Text, String(data)); | ||
} | ||
@@ -836,0 +839,0 @@ /** |
{ | ||
"name": "happy-dom", | ||
"version": "14.6.0", | ||
"version": "14.6.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/capricorn86/happy-dom", |
@@ -1168,4 +1168,9 @@ import Element from '../element/Element.js'; | ||
*/ | ||
public createTextNode(data?: string): Text { | ||
return NodeFactory.createNode<Text>(this, this[PropertySymbol.ownerWindow].Text, data); | ||
public createTextNode(data: string): Text { | ||
if (arguments.length < 1) { | ||
throw new TypeError( | ||
`Failed to execute 'createTextNode' on 'Document': 1 argument required, but only ${arguments.length} present.` | ||
); | ||
} | ||
return NodeFactory.createNode<Text>(this, this[PropertySymbol.ownerWindow].Text, String(data)); | ||
} | ||
@@ -1172,0 +1177,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8259126
165479