typed-dom
Advanced tools
Comparing version 0.0.319 to 0.0.320
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -737,13 +737,11 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
const i = this.targets.indexOf(target); | ||
~i || this.targets.push(target); | ||
i === -1 && this.targets.push(target); | ||
} | ||
del(target) { | ||
const i = this.targets.indexOf(target); | ||
~i && (0, array_1.splice)(this.targets, i, 1); | ||
i !== -1 && (0, array_1.splice)(this.targets, i, 1); | ||
} | ||
get isConnected() { | ||
return !!this.element.parentNode && this.element.isConnected; | ||
} | ||
dispatchMutateEvent() { | ||
this.mutate && this.element.dispatchEvent(new Event('mutate', { | ||
if (!this.mutate) return; | ||
this.element.dispatchEvent(new Event('mutate', { | ||
bubbles: false, | ||
@@ -755,7 +753,8 @@ cancelable: false | ||
if (targets.length === 0) return; | ||
if (targets !== this.targets && !this.isConnected) return; | ||
if (targets !== this.targets && !this.element.isConnected) return; | ||
for (const target of targets) { | ||
const events = Events.get(target); | ||
events.dispatchConnectEvent(); | ||
events.connect && target.element.dispatchEvent(new Event('connect', { | ||
if (!events.connect) continue; | ||
target.element.dispatchEvent(new Event('connect', { | ||
bubbles: false, | ||
@@ -768,7 +767,8 @@ cancelable: false | ||
if (targets.length === 0) return; | ||
if (targets !== this.targets && !this.isConnected) return; | ||
if (targets !== this.targets && !this.element.isConnected) return; | ||
for (const target of targets) { | ||
const events = Events.get(target); | ||
events.dispatchDisconnectEvent(); | ||
events.disconnect && target.element.dispatchEvent(new Event('disconnect', { | ||
if (!events.disconnect) continue; | ||
target.element.dispatchEvent(new Event('disconnect', { | ||
bubbles: false, | ||
@@ -775,0 +775,0 @@ cancelable: false |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -24,7 +24,6 @@ export declare namespace symbols { | ||
del(target: Target): void; | ||
private get isConnected(); | ||
dispatchMutateEvent(): void; | ||
dispatchConnectEvent(targets?: Target[]): void; | ||
dispatchDisconnectEvent(targets?: Target[]): void; | ||
dispatchConnectEvent(targets?: readonly Target[]): void; | ||
dispatchDisconnectEvent(targets?: readonly Target[]): void; | ||
} | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
22
index.js
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -737,13 +737,11 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
const i = this.targets.indexOf(target); | ||
~i || this.targets.push(target); | ||
i === -1 && this.targets.push(target); | ||
} | ||
del(target) { | ||
const i = this.targets.indexOf(target); | ||
~i && (0, array_1.splice)(this.targets, i, 1); | ||
i !== -1 && (0, array_1.splice)(this.targets, i, 1); | ||
} | ||
get isConnected() { | ||
return !!this.element.parentNode && this.element.isConnected; | ||
} | ||
dispatchMutateEvent() { | ||
this.mutate && this.element.dispatchEvent(new Event('mutate', { | ||
if (!this.mutate) return; | ||
this.element.dispatchEvent(new Event('mutate', { | ||
bubbles: false, | ||
@@ -755,7 +753,8 @@ cancelable: false | ||
if (targets.length === 0) return; | ||
if (targets !== this.targets && !this.isConnected) return; | ||
if (targets !== this.targets && !this.element.isConnected) return; | ||
for (const target of targets) { | ||
const events = Events.get(target); | ||
events.dispatchConnectEvent(); | ||
events.connect && target.element.dispatchEvent(new Event('connect', { | ||
if (!events.connect) continue; | ||
target.element.dispatchEvent(new Event('connect', { | ||
bubbles: false, | ||
@@ -768,7 +767,8 @@ cancelable: false | ||
if (targets.length === 0) return; | ||
if (targets !== this.targets && !this.isConnected) return; | ||
if (targets !== this.targets && !this.element.isConnected) return; | ||
for (const target of targets) { | ||
const events = Events.get(target); | ||
events.dispatchDisconnectEvent(); | ||
events.disconnect && target.element.dispatchEvent(new Event('disconnect', { | ||
if (!events.disconnect) continue; | ||
target.element.dispatchEvent(new Event('disconnect', { | ||
bubbles: false, | ||
@@ -775,0 +775,0 @@ cancelable: false |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
{ | ||
"name": "typed-dom", | ||
"version": "0.0.319", | ||
"version": "0.0.320", | ||
"description": "A value-level and type-level DOM builder.", | ||
@@ -5,0 +5,0 @@ "private": false, |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.319 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! typed-dom v0.0.320 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -44,36 +44,36 @@ import { splice } from 'spica/array'; | ||
const i = this.targets.indexOf(target); | ||
~i || this.targets.push(target); | ||
i === -1 && this.targets.push(target); | ||
} | ||
public del(target: Target): void { | ||
const i = this.targets.indexOf(target); | ||
~i && splice(this.targets, i, 1); | ||
i !== -1 && splice(this.targets, i, 1); | ||
} | ||
private get isConnected(): boolean { | ||
return !!this.element.parentNode && this.element.isConnected; | ||
} | ||
public dispatchMutateEvent(): void { | ||
this.mutate && this.element.dispatchEvent(new Event('mutate', { bubbles: false, cancelable: false })); | ||
if (!this.mutate) return; | ||
this.element.dispatchEvent(new Event('mutate', { bubbles: false, cancelable: false })); | ||
} | ||
public dispatchConnectEvent( | ||
targets: Target[] = this.targets, | ||
targets: readonly Target[] = this.targets, | ||
): void { | ||
if (targets.length === 0) return; | ||
if (targets !== this.targets && !this.isConnected) return; | ||
if (targets !== this.targets && !this.element.isConnected) return; | ||
for (const target of targets) { | ||
const events = Events.get(target); | ||
events.dispatchConnectEvent(); | ||
events.connect && target.element.dispatchEvent(new Event('connect', { bubbles: false, cancelable: false })); | ||
if (!events.connect) continue; | ||
target.element.dispatchEvent(new Event('connect', { bubbles: false, cancelable: false })); | ||
} | ||
} | ||
public dispatchDisconnectEvent( | ||
targets: Target[] = this.targets, | ||
targets: readonly Target[] = this.targets, | ||
): void { | ||
if (targets.length === 0) return; | ||
if (targets !== this.targets && !this.isConnected) return; | ||
if (targets !== this.targets && !this.element.isConnected) return; | ||
for (const target of targets) { | ||
const events = Events.get(target); | ||
events.dispatchDisconnectEvent(); | ||
events.disconnect && target.element.dispatchEvent(new Event('disconnect', { bubbles: false, cancelable: false })); | ||
if (!events.disconnect) continue; | ||
target.element.dispatchEvent(new Event('disconnect', { bubbles: false, cancelable: false })); | ||
} | ||
} | ||
} |
386944
7994