New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

linkedom

Package Overview
Dependencies
Maintainers
1
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linkedom - npm Package Compare versions

Comparing version 0.13.2 to 0.13.3

13

cjs/html/element.js
'use strict';
const {END} = require('../shared/symbols.js');
const {END, UPGRADE} = require('../shared/symbols.js');
const {booleanAttribute, stringAttribute} = require('../shared/attributes.js');

@@ -35,3 +35,12 @@

super(ownerDocument, localName);
if (!ownerDocument) {
if (ownerDocument) {
if (ownerDocument[UPGRADE]) {
const {element, values} = ownerDocument[UPGRADE];
ownerDocument[UPGRADE] = null;
for (const [key, value] of values)
element[key] = value;
return element;
}
}
else {
const {constructor: Class, [END]: end} = this;

@@ -38,0 +47,0 @@ if (!Classes.has(Class))

20

cjs/interface/custom-element-registry.js
'use strict';
const {ELEMENT_NODE} = require('../shared/constants.js');
const {END, NEXT} = require('../shared/symbols.js');
const {END, NEXT, UPGRADE} = require('../shared/symbols.js');
const {entries, setPrototypeOf} = require('../shared/object.js');

@@ -71,3 +71,3 @@

/**
* @param {Document} ownerDocument
* @param {Document} ownerDocument
*/

@@ -79,3 +79,3 @@ constructor(ownerDocument) {

this.ownerDocument = ownerDocument;
/**

@@ -85,3 +85,3 @@ * @private

this.registry = new Map;
/**

@@ -91,3 +91,3 @@ * @private

this.waiting = new Map;
/**

@@ -146,3 +146,3 @@ * @private

return;
const {registry} = this;
const {ownerDocument, registry} = this;
const ce = element.getAttribute('is') || element.localName;

@@ -160,8 +160,8 @@ if (registry.has(ce)) {

setPrototypeOf(element, new Class(this.ownerDocument, ce));
setPrototypeOf(element, Class.prototype);
ownerDocument[UPGRADE] = {element, values};
new Class(ownerDocument, ce);
customElements.set(element, {connected: isConnected});
for (const [key, value] of values)
element[key] = value;
for (const attr of attributes)

@@ -168,0 +168,0 @@ element.setAttributeNode(attr);

@@ -7,3 +7,3 @@ 'use strict';

const {
CUSTOM_ELEMENTS, DOM_PARSER, IMAGE, MUTATION_OBSERVER, DOCTYPE, END, NEXT, MIME, EVENT_TARGET
CUSTOM_ELEMENTS, DOM_PARSER, IMAGE, MUTATION_OBSERVER, DOCTYPE, END, NEXT, MIME, EVENT_TARGET, UPGRADE
} = require('../shared/symbols.js');

@@ -73,2 +73,3 @@

this[IMAGE] = null;
this[UPGRADE] = null;
}

@@ -75,0 +76,0 @@

@@ -78,4 +78,8 @@ 'use strict';

// used to upgrade Custom Elements
const UPGRADE = Symbol('upgrade');
exports.UPGRADE = UPGRADE;
// used to define generic values
const VALUE = Symbol('value');
exports.VALUE = VALUE;

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

import {END} from '../shared/symbols.js';
import {END, UPGRADE} from '../shared/symbols.js';
import {booleanAttribute, stringAttribute} from '../shared/attributes.js';

@@ -34,3 +34,12 @@

super(ownerDocument, localName);
if (!ownerDocument) {
if (ownerDocument) {
if (ownerDocument[UPGRADE]) {
const {element, values} = ownerDocument[UPGRADE];
ownerDocument[UPGRADE] = null;
for (const [key, value] of values)
element[key] = value;
return element;
}
}
else {
const {constructor: Class, [END]: end} = this;

@@ -37,0 +46,0 @@ if (!Classes.has(Class))

import {ELEMENT_NODE} from '../shared/constants.js';
import {END, NEXT} from '../shared/symbols.js';
import {END, NEXT, UPGRADE} from '../shared/symbols.js';
import {entries, setPrototypeOf} from '../shared/object.js';

@@ -65,3 +65,3 @@

/**
* @param {Document} ownerDocument
* @param {Document} ownerDocument
*/

@@ -73,3 +73,3 @@ constructor(ownerDocument) {

this.ownerDocument = ownerDocument;
/**

@@ -79,3 +79,3 @@ * @private

this.registry = new Map;
/**

@@ -85,3 +85,3 @@ * @private

this.waiting = new Map;
/**

@@ -140,3 +140,3 @@ * @private

return;
const {registry} = this;
const {ownerDocument, registry} = this;
const ce = element.getAttribute('is') || element.localName;

@@ -154,8 +154,8 @@ if (registry.has(ce)) {

setPrototypeOf(element, new Class(this.ownerDocument, ce));
setPrototypeOf(element, Class.prototype);
ownerDocument[UPGRADE] = {element, values};
new Class(ownerDocument, ce);
customElements.set(element, {connected: isConnected});
for (const [key, value] of values)
element[key] = value;
for (const attr of attributes)

@@ -162,0 +162,0 @@ element.setAttributeNode(attr);

@@ -7,3 +7,3 @@ import {performance} from '../../commonjs/perf_hooks.cjs';

CUSTOM_ELEMENTS, DOM_PARSER, IMAGE, MUTATION_OBSERVER,
DOCTYPE, END, NEXT, MIME, EVENT_TARGET
DOCTYPE, END, NEXT, MIME, EVENT_TARGET, UPGRADE
} from '../shared/symbols.js';

@@ -73,2 +73,3 @@

this[IMAGE] = null;
this[UPGRADE] = null;
}

@@ -75,0 +76,0 @@

@@ -58,3 +58,6 @@ // used in Attr to signal changes

// used to upgrade Custom Elements
export const UPGRADE = Symbol('upgrade');
// used to define generic values
export const VALUE = Symbol('value');
{
"name": "linkedom",
"version": "0.13.2",
"version": "0.13.3",
"description": "A triple-linked lists based DOM implementation",

@@ -5,0 +5,0 @@ "main": "./cjs/index.js",

@@ -40,2 +40,3 @@ /**

[IMAGE]: any;
[UPGRADE]: any;
[EVENT_TARGET]: EventTarget;

@@ -60,3 +61,4 @@ }

import { IMAGE } from "../shared/symbols.js";
import { UPGRADE } from "../shared/symbols.js";
import { EVENT_TARGET } from "../shared/symbols.js";
import { EventTarget } from "./event-target.js";

@@ -20,2 +20,3 @@ export const CHANGED: unique symbol;

export const STYLE: unique symbol;
export const UPGRADE: unique symbol;
export const VALUE: unique symbol;

Sorry, the diff of this file is too big to display

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