@viewfly/platform-browser 0.5.4 → 0.6.0
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.
|
@@ -14,6 +14,7 @@ export declare class DomRenderer extends NativeRenderer<HTMLElement, Text> {
|
|
|
14
14
|
prependChild(parent: HTMLElement, newChild: HTMLElement | Text): void;
|
|
15
15
|
insertAfter(newNode: HTMLElement | Text, ref: HTMLElement | Text): void;
|
|
16
16
|
remove(node: HTMLElement | Text): void;
|
|
17
|
+
cleanChildren(node: HTMLElement): void;
|
|
17
18
|
setProperty(node: HTMLElement, key: string, value: any, isSvg: boolean): void;
|
|
18
19
|
removeProperty(node: HTMLElement, key: string, isSvg: boolean): void;
|
|
19
20
|
setClass(target: HTMLElement, className: string): void;
|
|
@@ -29,6 +29,7 @@ export declare class HTMLRenderer extends NativeRenderer<VDOMElement, VDomText>
|
|
|
29
29
|
listen(): void;
|
|
30
30
|
unListen(): void;
|
|
31
31
|
remove(node: VDOMElement | VDomText): void;
|
|
32
|
+
cleanChildren(node: VDOMElement): void;
|
|
32
33
|
syncTextContent(target: VDomText, content: string): void;
|
|
33
34
|
insertAfter(newNode: VDOMElement | VDomText, ref: VDOMElement | VDomText): void;
|
|
34
35
|
}
|
package/bundles/index.esm.js
CHANGED
|
@@ -38,6 +38,9 @@ class DomRenderer extends NativeRenderer {
|
|
|
38
38
|
remove(node) {
|
|
39
39
|
node.remove();
|
|
40
40
|
}
|
|
41
|
+
cleanChildren(node) {
|
|
42
|
+
node.textContent = '';
|
|
43
|
+
}
|
|
41
44
|
setProperty(node, key, value, isSvg) {
|
|
42
45
|
const nameSpace = DomRenderer.NAMESPACES;
|
|
43
46
|
if (isSvg) {
|
|
@@ -219,6 +222,9 @@ class HTMLRenderer extends NativeRenderer {
|
|
|
219
222
|
}
|
|
220
223
|
node.parent = null;
|
|
221
224
|
}
|
|
225
|
+
cleanChildren(node) {
|
|
226
|
+
node.children = [];
|
|
227
|
+
}
|
|
222
228
|
syncTextContent(target, content) {
|
|
223
229
|
target.text = content;
|
|
224
230
|
}
|
package/bundles/index.js
CHANGED
|
@@ -40,6 +40,9 @@ class DomRenderer extends core.NativeRenderer {
|
|
|
40
40
|
remove(node) {
|
|
41
41
|
node.remove();
|
|
42
42
|
}
|
|
43
|
+
cleanChildren(node) {
|
|
44
|
+
node.textContent = '';
|
|
45
|
+
}
|
|
43
46
|
setProperty(node, key, value, isSvg) {
|
|
44
47
|
const nameSpace = DomRenderer.NAMESPACES;
|
|
45
48
|
if (isSvg) {
|
|
@@ -221,6 +224,9 @@ class HTMLRenderer extends core.NativeRenderer {
|
|
|
221
224
|
}
|
|
222
225
|
node.parent = null;
|
|
223
226
|
}
|
|
227
|
+
cleanChildren(node) {
|
|
228
|
+
node.children = [];
|
|
229
|
+
}
|
|
224
230
|
syncTextContent(target, content) {
|
|
225
231
|
target.text = content;
|
|
226
232
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/platform-browser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "This project is used to enable the Viewfly framework to run in a browser.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@viewfly/core": "^0.
|
|
15
|
+
"@viewfly/core": "^0.6.0",
|
|
16
16
|
"csstype": "^3.1.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"bugs": {
|
|
34
34
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "74774f062e956a723313a1b5ad4b8eab8dc78ae8"
|
|
37
37
|
}
|