Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typed-dom

Package Overview
Dependencies
Maintainers
1
Versions
350
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typed-dom - npm Package Compare versions

Comparing version 0.0.268 to 0.0.269

14

dom.ts

@@ -134,4 +134,5 @@ import { Symbol, document } from 'spica/global';

for (const name of names) {
if (name.slice(0, 2) !== 'on') throw new Error(`TypedDOM: Attribute names for event listeners must start with "on" but got "${name}".`);
el.addEventListener(name.slice(2), value, {
if (!name.startsWith('on')) throw new Error(`TypedDOM: Attribute names for event listeners must start with "on" but got "${name}".`);
const eventname = name.slice(2).toLowerCase();
el.addEventListener(eventname, value, {
passive: [

@@ -144,5 +145,10 @@ 'wheel',

'touchcancel',
].includes(name.slice(2)),
].includes(eventname),
});
el[name.toLowerCase()] ??= '';
switch (eventname) {
case 'mutate':
case 'connect':
case 'disconnect':
el[`on${eventname}`] ??= '';
}
}

@@ -149,0 +155,0 @@ continue;

{
"name": "typed-dom",
"version": "0.0.268",
"version": "0.0.269",
"description": "A value-level and type-level DOM builder.",

@@ -5,0 +5,0 @@ "private": false,

@@ -78,5 +78,6 @@ import { Event } from 'spica/global';

const events = this[privates.events];
events.mutate = element['onmutate'] != null;
events.connect = element['onconnect'] != null;
events.disconnect = element['ondisconnect'] != null;
assert('' != null);
events.mutate = 'onmutate' in element && element['onmutate'] != null;
events.connect = 'onconnect' in element && element['onconnect'] != null;
events.disconnect = 'ondisconnect' in element && element['ondisconnect'] != null;
this[privates.children] = children;

@@ -83,0 +84,0 @@ this[privates.container] = container;

@@ -134,4 +134,5 @@ import { Symbol, document } from 'spica/global';

for (const name of names) {
if (name.slice(0, 2) !== 'on') throw new Error(`TypedDOM: Attribute names for event listeners must start with "on" but got "${name}".`);
el.addEventListener(name.slice(2), value, {
if (!name.startsWith('on')) throw new Error(`TypedDOM: Attribute names for event listeners must start with "on" but got "${name}".`);
const eventname = name.slice(2).toLowerCase();
el.addEventListener(eventname, value, {
passive: [

@@ -144,5 +145,10 @@ 'wheel',

'touchcancel',
].includes(name.slice(2)),
].includes(eventname),
});
el[name.toLowerCase()] ??= '';
switch (eventname) {
case 'mutate':
case 'connect':
case 'disconnect':
el[`on${eventname}`] ??= '';
}
}

@@ -149,0 +155,0 @@ continue;

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

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