@kaliber/build 0.0.150 → 0.0.151
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/universalComponents.js +11 -1
- package/package.json +1 -1
@@ -63,9 +63,18 @@ function createVirtualReactContainer({ initialNodes, startNode, endNode }) {
|
|
63
63
|
removeEventListener: (...args) => parent.removeEventListener(...args),
|
64
64
|
dispatchEvent: (...args) => parent.dispatchEvent(...args),
|
65
65
|
get firstChild() { return nodes[0] || null },
|
66
|
-
get nodeType() { return parent.
|
66
|
+
get nodeType() { return parent.ELEMENT_NODE },
|
67
67
|
get ownerDocument() { return parent.ownerDocument },
|
68
68
|
get nodeName() { return 'virtualized container' },
|
69
|
+
get textContent() { return '' },
|
70
|
+
set textContent(value) {
|
71
|
+
if (value) throw new Error(`Unexpected value set by React: "${value}"`)
|
72
|
+
nodes.forEach(node => parent.removeChild(node))
|
73
|
+
nodes.length = 0
|
74
|
+
},
|
75
|
+
get tagName() { return 'DIV' },
|
76
|
+
get namespaceURI() { return parent.namespaceURI },
|
77
|
+
get onclick() { return undefined }, // this is accessed as part of an obscure fix for bubbling behavior in Safari. By returning undefined we disable that 'fix'
|
69
78
|
removeChild(child) {
|
70
79
|
const result = parent.removeChild(child)
|
71
80
|
nodes = nodes.filter(x => x !== child)
|
@@ -83,6 +92,7 @@ function createVirtualReactContainer({ initialNodes, startNode, endNode }) {
|
|
83
92
|
return result
|
84
93
|
},
|
85
94
|
}
|
95
|
+
|
86
96
|
// The statement below is a lie. We supply an object that has all methods that React calls on it
|
87
97
|
return /** @type {Element} */ (container)
|
88
98
|
}
|
package/package.json
CHANGED