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.0 to 1.15.1

14

lib/algorithm/BoundaryPointAlgorithm.d.ts

@@ -1,2 +0,2 @@

import { BoundaryPoint, BoundaryPosition, Node } from "../dom/interfaces";
import { BoundaryPoint, BoundaryPosition } from "../dom/interfaces";
/**

@@ -9,13 +9,1 @@ * Defines the position of a boundary point relative to another.

export declare function boundaryPoint_position(bp: BoundaryPoint, relativeTo: BoundaryPoint): BoundaryPosition;
/**
* Returns the boundary point for the start of a node.
*
* @param node - a node
*/
export declare function boundaryPoint_nodeStart(node: Node): BoundaryPoint;
/**
* Returns the boundary point for the end of a node.
*
* @param node - a node
*/
export declare function boundaryPoint_nodeEnd(node: Node): BoundaryPoint;

@@ -19,5 +19,3 @@ "use strict";

*/
if (TreeAlgorithm_1.tree_rootNode(nodeA) !== TreeAlgorithm_1.tree_rootNode(nodeB)) {
throw new Error("Boundary points must share the same root node.");
}
console.assert(TreeAlgorithm_1.tree_rootNode(nodeA) === TreeAlgorithm_1.tree_rootNode(nodeB), "Boundary points must share the same root node.");
/**

@@ -81,20 +79,2 @@ * 2. If nodeA is nodeB, then return equal if offsetA is offsetB, before

exports.boundaryPoint_position = boundaryPoint_position;
/**
* Returns the boundary point for the start of a node.
*
* @param node - a node
*/
function boundaryPoint_nodeStart(node) {
return [node, 0];
}
exports.boundaryPoint_nodeStart = boundaryPoint_nodeStart;
/**
* Returns the boundary point for the end of a node.
*
* @param node - a node
*/
function boundaryPoint_nodeEnd(node) {
return [node, TreeAlgorithm_1.tree_nodeLength(node)];
}
exports.boundaryPoint_nodeEnd = boundaryPoint_nodeEnd;
//# sourceMappingURL=BoundaryPointAlgorithm.js.map

4

lib/algorithm/CharacterDataAlgorithm.js

@@ -64,6 +64,6 @@ "use strict";

if (range._start[0] === node && range._start[1] > offset && range._start[1] <= offset + count) {
range._start[1] += offset;
range._start[1] = offset;
}
if (range._end[0] === node && range._end[1] > offset && range._end[1] <= offset + count) {
range._end[1] += offset;
range._end[1] = offset;
}

@@ -70,0 +70,0 @@ if (range._start[0] === node && range._start[1] > offset + count) {

@@ -36,3 +36,3 @@ import { Document, DOMImplementation, Window, XMLDocument, AbortController, AbortSignal, DocumentType, Element, DocumentFragment, ShadowRoot, Attr, Text, CDATASection, Comment, ProcessingInstruction, Node, HTMLCollection, NodeList, NamedNodeMap, BoundaryPoint, Range, NodeIterator, TreeWalker, NodeFilter, MutationRecord, DOMTokenList } from "../dom/interfaces";

*/
export declare function create_documentType(document: Document, name: string, publicId?: string, systemId?: string): DocumentType;
export declare function create_documentType(document: Document, name: string, publicId: string, systemId: string): DocumentType;
/**

@@ -46,3 +46,3 @@ * Creates a new `Element` node.

*/
export declare function create_element(document: Document, localName: string, namespace?: string | null, prefix?: string | null): Element;
export declare function create_element(document: Document, localName: string, namespace: string | null, prefix: string | null): Element;
/**

@@ -56,3 +56,3 @@ * Creates a new `HTMLElement` node.

*/
export declare function create_htmlElement(document: Document, localName: string, namespace?: string | null, prefix?: string | null): Element;
export declare function create_htmlElement(document: Document, localName: string, namespace: string | null, prefix: string | null): Element;
/**

@@ -66,3 +66,3 @@ * Creates a new `HTMLUnknownElement` node.

*/
export declare function create_htmlUnknownElement(document: Document, localName: string, namespace?: string | null, prefix?: string | null): Element;
export declare function create_htmlUnknownElement(document: Document, localName: string, namespace: string | null, prefix: string | null): Element;
/**

@@ -94,3 +94,3 @@ * Creates a new `DocumentFragment` node.

*/
export declare function create_text(document: Document, data?: string): Text;
export declare function create_text(document: Document, data: string): Text;
/**

@@ -102,3 +102,3 @@ * Creates a new `CDATASection` node.

*/
export declare function create_cdataSection(document: Document, data?: string): CDATASection;
export declare function create_cdataSection(document: Document, data: string): CDATASection;
/**

@@ -110,3 +110,3 @@ * Creates a new `Comment` node.

*/
export declare function create_comment(document: Document, data?: string): Comment;
export declare function create_comment(document: Document, data: string): Comment;
/**

@@ -119,3 +119,3 @@ * Creates a new `ProcessingInstruction` node.

*/
export declare function create_processingInstruction(document: Document, target: string, data?: string): ProcessingInstruction;
export declare function create_processingInstruction(document: Document, target: string, data: string): ProcessingInstruction;
/**

@@ -122,0 +122,0 @@ * Creates a new `HTMLCollection`.

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

*/
function create_documentType(document, name, publicId = '', systemId = '') {
function create_documentType(document, name, publicId, systemId) {
return DocumentTypeImpl_1.DocumentTypeImpl._create(document, name, publicId, systemId);

@@ -93,3 +93,3 @@ }

*/
function create_element(document, localName, namespace = null, prefix = null) {
function create_element(document, localName, namespace, prefix) {
return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix);

@@ -106,3 +106,3 @@ }

*/
function create_htmlElement(document, localName, namespace = null, prefix = null) {
function create_htmlElement(document, localName, namespace, prefix) {
// TODO: Implement in HTML DOM

@@ -120,3 +120,3 @@ return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix);

*/
function create_htmlUnknownElement(document, localName, namespace = null, prefix = null) {
function create_htmlUnknownElement(document, localName, namespace, prefix) {
// TODO: Implement in HTML DOM

@@ -161,3 +161,3 @@ return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix);

*/
function create_text(document, data = '') {
function create_text(document, data) {
return TextImpl_1.TextImpl._create(document, data);

@@ -172,3 +172,3 @@ }

*/
function create_cdataSection(document, data = '') {
function create_cdataSection(document, data) {
return CDATASectionImpl_1.CDATASectionImpl._create(document, data);

@@ -183,3 +183,3 @@ }

*/
function create_comment(document, data = '') {
function create_comment(document, data) {
return CommentImpl_1.CommentImpl._create(document, data);

@@ -195,3 +195,3 @@ }

*/
function create_processingInstruction(document, target, data = '') {
function create_processingInstruction(document, target, data) {
return ProcessingInstructionImpl_1.ProcessingInstructionImpl._create(document, target, data);

@@ -198,0 +198,0 @@ }

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

*/
while (node) {
while (node !== null) {
/**

@@ -105,3 +105,3 @@ * 3.4.1. Let sibling be node’s next sibling if type is first, and

let sibling = (next ? node._nextSibling : node._previousSibling);
while (sibling) {
while (sibling !== null) {
/**

@@ -135,7 +135,4 @@ * 3.2.1. Set node to sibling.

*/
if (node._parent === null) {
return null;
}
node = node._parent;
if (node === walker._root) {
if (node === null || node === walker._root) {
return null;

@@ -142,0 +139,0 @@ }

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

*/
if (node.childNodes.length === 0) {
if (node._children.size === 0) {
markup += "/";

@@ -197,3 +197,3 @@ skipEndTag = true;

*/
for (const childNode of node._children || node.childNodes) {
for (const childNode of node._children) {
markup += this._serializeNode(childNode, requireWellFormed);

@@ -244,3 +244,3 @@ }

let serializedDocument = "";
for (const childNode of node._children || node.childNodes) {
for (const childNode of node._children) {
serializedDocument += this._serializeNode(childNode, requireWellFormed);

@@ -327,3 +327,3 @@ }

let markup = "";
for (const childNode of node._children || node.childNodes) {
for (const childNode of node._children) {
markup += this._serializeNode(childNode, requireWellFormed);

@@ -330,0 +330,0 @@ }

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

@@ -28,5 +28,5 @@ "dom",

"dependencies": {
"@oozcitak/util": "8.0.0",
"@oozcitak/infra": "1.0.5",
"@oozcitak/url": "1.0.0"
"@oozcitak/url": "1.0.0",
"@oozcitak/util": "8.0.0"
},

@@ -39,2 +39,3 @@ "devDependencies": {

"@types/node": "*",
"@types/semver": "*",
"@types/xmldom": "*",

@@ -48,2 +49,3 @@ "benchmark": "*",

"jsdom": "*",
"semver": "*",
"ts-jest": "*",

@@ -50,0 +52,0 @@ "ts-node": "*",

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