@esportsplus/template 0.15.18 → 0.15.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @esportsplus/template might be problematic. Click here for more details.
- package/build/html/hydrate.js +3 -1
- package/build/utilities.d.ts +1 -1
- package/build/utilities.js +2 -1
- package/package.json +1 -1
- package/src/html/hydrate.ts +3 -1
- package/src/utilities.ts +4 -2
package/build/html/hydrate.js
CHANGED
|
@@ -35,7 +35,9 @@ function hydrate(renderable, template) {
|
|
|
35
35
|
for (let i = slots.length - 1; i >= 0; i--) {
|
|
36
36
|
let { fn, path, slot } = slots[i];
|
|
37
37
|
if (path !== previous) {
|
|
38
|
-
|
|
38
|
+
if (node) {
|
|
39
|
+
apply(node);
|
|
40
|
+
}
|
|
39
41
|
node = fragment;
|
|
40
42
|
previous = path;
|
|
41
43
|
for (let o = 0, j = path.length; o < j; o++) {
|
package/build/utilities.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Element as E } from './types.js';
|
|
2
|
+
declare const append: (...nodes: (Node | string)[]) => void;
|
|
2
3
|
declare const addEventListener: {
|
|
3
4
|
<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
4
5
|
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
5
6
|
};
|
|
6
|
-
declare const append: (...nodes: (Node | string)[]) => void;
|
|
7
7
|
declare const removeEventListener: {
|
|
8
8
|
<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
9
9
|
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
package/build/utilities.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { micro as m, raf as r } from '@esportsplus/tasks';
|
|
2
2
|
let prototype, template = document.createElement('template'), t = document.createTextNode('');
|
|
3
|
+
prototype = DocumentFragment.prototype;
|
|
4
|
+
const append = prototype.append;
|
|
3
5
|
prototype = Element.prototype;
|
|
4
6
|
const addEventListener = prototype.addEventListener;
|
|
5
|
-
const append = prototype.append;
|
|
6
7
|
const removeEventListener = prototype.removeEventListener;
|
|
7
8
|
const className = Object.getOwnPropertyDescriptor(prototype, 'className').set;
|
|
8
9
|
const innerHTML = Object.getOwnPropertyDescriptor(prototype, 'innerHTML').set;
|
package/package.json
CHANGED
package/src/html/hydrate.ts
CHANGED
package/src/utilities.ts
CHANGED
|
@@ -7,13 +7,15 @@ let prototype,
|
|
|
7
7
|
t = document.createTextNode('');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
prototype = DocumentFragment.prototype;
|
|
11
|
+
|
|
12
|
+
const append = prototype.append
|
|
13
|
+
|
|
10
14
|
// https://github.com/localvoid/ivi/blob/master/packages/ivi/src/client/core.ts#L38
|
|
11
15
|
prototype = Element.prototype;
|
|
12
16
|
|
|
13
17
|
const addEventListener = prototype.addEventListener;
|
|
14
18
|
|
|
15
|
-
const append = prototype.append;
|
|
16
|
-
|
|
17
19
|
const removeEventListener = prototype.removeEventListener;
|
|
18
20
|
|
|
19
21
|
const className = Object.getOwnPropertyDescriptor(prototype, 'className')!.set!;
|