Socket
Socket
Sign inDemoInstall

@oozcitak/dom

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oozcitak/dom - npm Package Compare versions

Comparing version 1.15.1 to 1.15.2

6

lib/algorithm/BoundaryPointAlgorithm.js

@@ -61,6 +61,4 @@ "use strict";

while (!TreeAlgorithm_1.tree_isChildOf(nodeA, child)) {
if (child._parent === null) {
throw new Error("Node has no parent node.");
}
else {
/* istanbul ignore else */
if (child._parent !== null) {
child = child._parent;

@@ -67,0 +65,0 @@ }

@@ -27,2 +27,2 @@ /**

*/
export declare function orderedSet_contains(set1: Set<string>, set2: Set<string>, caseSensitive?: boolean): boolean;
export declare function orderedSet_contains(set1: Set<string>, set2: Set<string>, caseSensitive: boolean): boolean;

@@ -50,3 +50,3 @@ "use strict";

*/
function orderedSet_contains(set1, set2, caseSensitive = true) {
function orderedSet_contains(set1, set2, caseSensitive) {
for (const val2 of set2) {

@@ -53,0 +53,0 @@ let found = false;

@@ -12,3 +12,3 @@ "use strict";

*/
constructor(name, message) {
constructor(name, message = "") {
super(message);

@@ -23,4 +23,4 @@ this.name = name;

*/
constructor(message) {
super("DOMStringSizeError", message || "");
constructor(message = "") {
super("DOMStringSizeError", message);
}

@@ -33,4 +33,4 @@ }

*/
constructor(message) {
super("WrongDocumentError", "The object is in the wrong document. " + message || "");
constructor(message = "") {
super("WrongDocumentError", "The object is in the wrong document. " + message);
}

@@ -43,4 +43,4 @@ }

*/
constructor(message) {
super("NoDataAllowedError", message || "");
constructor(message = "") {
super("NoDataAllowedError", message);
}

@@ -53,4 +53,4 @@ }

*/
constructor(message) {
super("NoModificationAllowedError", "The object can not be modified. " + message || "");
constructor(message = "") {
super("NoModificationAllowedError", "The object can not be modified. " + message);
}

@@ -63,4 +63,4 @@ }

*/
constructor(message) {
super("NotSupportedError", "The operation is not supported. " + message || "");
constructor(message = "") {
super("NotSupportedError", "The operation is not supported. " + message);
}

@@ -73,4 +73,4 @@ }

*/
constructor(message) {
super("InUseAttributeError", message || "");
constructor(message = "") {
super("InUseAttributeError", message);
}

@@ -83,4 +83,4 @@ }

*/
constructor(message) {
super("InvalidStateError", "The object is in an invalid state. " + message || "");
constructor(message = "") {
super("InvalidStateError", "The object is in an invalid state. " + message);
}

@@ -93,4 +93,4 @@ }

*/
constructor(message) {
super("InvalidModificationError", "The object can not be modified in this way. " + message || "");
constructor(message = "") {
super("InvalidModificationError", "The object can not be modified in this way. " + message);
}

@@ -103,4 +103,4 @@ }

*/
constructor(message) {
super("NamespaceError", "The operation is not allowed by Namespaces in XML. [XMLNS] " + message || "");
constructor(message = "") {
super("NamespaceError", "The operation is not allowed by Namespaces in XML. [XMLNS] " + message);
}

@@ -113,4 +113,4 @@ }

*/
constructor(message) {
super("InvalidAccessError", "The object does not support the operation or argument. " + message || "");
constructor(message = "") {
super("InvalidAccessError", "The object does not support the operation or argument. " + message);
}

@@ -123,4 +123,4 @@ }

*/
constructor(message) {
super("ValidationError", message || "");
constructor(message = "") {
super("ValidationError", message);
}

@@ -133,4 +133,4 @@ }

*/
constructor(message) {
super("TypeMismatchError", message || "");
constructor(message = "") {
super("TypeMismatchError", message);
}

@@ -143,4 +143,4 @@ }

*/
constructor(message) {
super("SecurityError", "The operation is insecure. " + message || "");
constructor(message = "") {
super("SecurityError", "The operation is insecure. " + message);
}

@@ -153,4 +153,4 @@ }

*/
constructor(message) {
super("NetworkError", "A network error occurred. " + message || "");
constructor(message = "") {
super("NetworkError", "A network error occurred. " + message);
}

@@ -163,4 +163,4 @@ }

*/
constructor(message) {
super("AbortError", "The operation was aborted. " + message || "");
constructor(message = "") {
super("AbortError", "The operation was aborted. " + message);
}

@@ -173,4 +173,4 @@ }

*/
constructor(message) {
super("URLMismatchError", "The given URL does not match another URL. " + message || "");
constructor(message = "") {
super("URLMismatchError", "The given URL does not match another URL. " + message);
}

@@ -183,4 +183,4 @@ }

*/
constructor(message) {
super("QuotaExceededError", "The quota has been exceeded. " + message || "");
constructor(message = "") {
super("QuotaExceededError", "The quota has been exceeded. " + message);
}

@@ -193,4 +193,4 @@ }

*/
constructor(message) {
super("TimeoutError", "The operation timed out. " + message || "");
constructor(message = "") {
super("TimeoutError", "The operation timed out. " + message);
}

@@ -203,4 +203,4 @@ }

*/
constructor(message) {
super("InvalidNodeTypeError", "The supplied node is incorrect or has an incorrect ancestor for this operation. " + message || "");
constructor(message = "") {
super("InvalidNodeTypeError", "The supplied node is incorrect or has an incorrect ancestor for this operation. " + message);
}

@@ -213,4 +213,4 @@ }

*/
constructor(message) {
super("DataCloneError", "The object can not be cloned. " + message || "");
constructor(message = "") {
super("DataCloneError", "The object can not be cloned. " + message);
}

@@ -223,4 +223,4 @@ }

*/
constructor(message) {
super("NotImplementedError", "The DOM method is not implemented by this module. " + message || "");
constructor(message = "") {
super("NotImplementedError", "The DOM method is not implemented by this module. " + message);
}

@@ -233,4 +233,4 @@ }

*/
constructor(message) {
super("HierarchyRequestError", "The operation would yield an incorrect node tree. " + message || "");
constructor(message = "") {
super("HierarchyRequestError", "The operation would yield an incorrect node tree. " + message);
}

@@ -243,4 +243,4 @@ }

*/
constructor(message) {
super("NotFoundError", "The object can not be found here. " + message || "");
constructor(message = "") {
super("NotFoundError", "The object can not be found here. " + message);
}

@@ -253,4 +253,4 @@ }

*/
constructor(message) {
super("NotFoundError", "The index is not in the allowed range. " + message || "");
constructor(message = "") {
super("IndexSizeError", "The index is not in the allowed range. " + message);
}

@@ -263,4 +263,4 @@ }

*/
constructor(message) {
super("SyntaxError", "The string did not match the expected pattern. " + message || "");
constructor(message = "") {
super("SyntaxError", "The string did not match the expected pattern. " + message);
}

@@ -273,4 +273,4 @@ }

*/
constructor(message) {
super("InvalidCharacterError", "The string contains invalid characters. " + message || "");
constructor(message = "") {
super("InvalidCharacterError", "The string contains invalid characters. " + message);
}

@@ -277,0 +277,0 @@ }

@@ -90,5 +90,3 @@ import { Document } from "../dom/interfaces";

readonly name: string;
readonly attributes: {
[key: string]: string;
};
readonly attributes: Array<[string, string]>;
readonly selfClosing: boolean;

@@ -95,0 +93,0 @@ }

@@ -89,4 +89,3 @@ "use strict";

// attribute
for (const attName in element.attributes) {
const attValue = element.attributes[attName];
for (const [attName, attValue] of element.attributes) {
if (attName === "xmlns") {

@@ -109,4 +108,3 @@ namespace = attValue;

const localNameSet = new LocalNameSet_1.LocalNameSet();
for (const attName in element.attributes) {
const attValue = element.attributes[attName];
for (const [attName, attValue] of element.attributes) {
// skip the default namespace declaration attribute

@@ -158,2 +156,3 @@ if (attName === "xmlns") {

}
/* istanbul ignore else */
if (context._parent) {

@@ -160,0 +159,0 @@ context = context._parent;

@@ -74,6 +74,2 @@ import { XMLToken, XMLLexer, XMLLexerOptions } from "./interfaces";

/**
* Returns the current character.
*/
private c;
/**
* Skips the length of the given string if the string from current position

@@ -80,0 +76,0 @@ * starts with the given string.

@@ -192,9 +192,9 @@ "use strict";

if (this.skipIfStartsWith('>')) {
return { type: interfaces_1.TokenType.Element, name: name, attributes: {}, selfClosing: false };
return { type: interfaces_1.TokenType.Element, name: name, attributes: [], selfClosing: false };
}
else if (this.skipIfStartsWith('/>')) {
return { type: interfaces_1.TokenType.Element, name: name, attributes: {}, selfClosing: true };
return { type: interfaces_1.TokenType.Element, name: name, attributes: [], selfClosing: true };
}
// attributes
const attributes = {};
const attributes = [];
while (!this.eof()) {

@@ -209,4 +209,4 @@ // end tag

}
const [attName, attValue] = this.attribute();
attributes[attName] = attValue;
const attr = this.attribute();
attributes.push(attr);
}

@@ -263,6 +263,2 @@ throw new Error('Missing opening element tag end symbol `>`');

/**
* Returns the current character.
*/
c() { return this._str[this._index]; }
/**
* Skips the length of the given string if the string from current position

@@ -321,3 +317,3 @@ * starts with the given string.

const startIndex = this._index;
this._index += count;
this.seek(count);
return this._str.slice(startIndex, this._index);

@@ -324,0 +320,0 @@ }

@@ -894,6 +894,3 @@ "use strict";

*/
for (let i = 0; i < node.attributes.length; i++) {
const attr = node.attributes.item(i);
if (!attr)
continue;
for (const attr of node.attributes) {
/**

@@ -900,0 +897,0 @@ * _Note:_ The following conditional steps find namespace prefixes. Only

{
"name": "@oozcitak/dom",
"version": "1.15.1",
"version": "1.15.2",
"keywords": [

@@ -5,0 +5,0 @@ "dom",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc