(data)
| 746 | |
| 747 | // https://dom.spec.whatwg.org/#dom-document-createcdatasection |
| 748 | createCDATASection(data) { |
| 749 | if (this._parsingMode === "html") { |
| 750 | throw DOMException.create(this._globalObject, [ |
| 751 | "Cannot create CDATA sections in HTML documents", |
| 752 | "NotSupportedError" |
| 753 | ]); |
| 754 | } |
| 755 | |
| 756 | if (data.includes("]]>")) { |
| 757 | throw DOMException.create(this._globalObject, [ |
| 758 | "CDATA section data cannot contain the string \"]]>\"", |
| 759 | "InvalidCharacterError" |
| 760 | ]); |
| 761 | } |
| 762 | |
| 763 | return CDATASection.createImpl(this._globalObject, [], { |
| 764 | ownerDocument: this, |
| 765 | data |
| 766 | }); |
| 767 | } |
| 768 | |
| 769 | createTextNode(data) { |
| 770 | return Text.createImpl(this._globalObject, [], { |
no outgoing calls
no test coverage detected