dom-expressions 0.32.13 → 0.32.14

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dom-expressions",
3
3
  "description": "A Fine-Grained Runtime for Performant DOM Rendering",
4
- "version": "0.32.13",
4
+ "version": "0.32.14",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -22,5 +22,5 @@
22
22
  "devDependencies": {
23
23
  "babel-plugin-jsx-dom-expressions": "^0.32.11"
24
24
  },
25
- "gitHead": "b810a46464dce9e5824f26f90e0fbf49d0b95581"
25
+ "gitHead": "8f2cd82a0fc1c5efc5c667e9284e3c273b77f6f6"
26
26
  }
package/src/client.js CHANGED
@@ -315,6 +315,12 @@ function eventHandler(e) {
315
315
  }
316
316
  });
317
317
 
318
+ // cancel html streaming
319
+ if (window._$HY && !sharedConfig.done) {
320
+ sharedConfig.done = true;
321
+ document.querySelectorAll("[id^=pl-]").forEach(elem => elem.remove());
322
+ }
323
+
318
324
  while (node !== null) {
319
325
  const handler = node[key];
320
326
  if (handler && !node.disabled) {
package/src/server.js CHANGED
@@ -3,7 +3,7 @@ import { sharedConfig } from "rxcore";
3
3
  import devalue from "devalue";
4
4
  export { createComponent } from "rxcore";
5
5
 
6
- const REPLACE_SCRIPT = `function $df(e,y,t,g){t=document.getElementById(e),g=document.getElementById("pl"+e),g&&g.replaceWith(...t.childNodes),_$HY.set(e,y||null)}`;
6
+ const REPLACE_SCRIPT = `function $df(e,t,d,l){d=document.getElementById(e),(l=document.getElementById("pl-"+e))&&l.replaceWith(...d.childNodes),d.remove(),_$HY.set(e,t||null)}`;
7
7
  const FRAGMENT_REPLACE = /<!\[([\d-]+)\]>/;
8
8
 
9
9
  export function renderToString(code, options = {}) {