Comparing version 1.5.7 to 1.5.8
# Changelog | ||
## 1.5.8- 2021-01-19 | ||
- Minor perf upgrade | ||
- Added code example | ||
## 1.5.7- 2021-01-06 | ||
@@ -4,0 +9,0 @@ |
@@ -304,3 +304,3 @@ // Safari Polyfills | ||
while (childNode) { | ||
if (isTextNode(childNode)) { | ||
if (isTextNode(childNode) && childNode.nodeValue?.includes("{{")) { | ||
setReactivitySingle(childNode); | ||
@@ -314,3 +314,3 @@ } | ||
let attr_OR_text, match; | ||
if (isTextNode(node)) { | ||
if (!key) { | ||
attr_OR_text = node.nodeValue; // nodeValue is (always) defined on Text Nodes | ||
@@ -317,0 +317,0 @@ } |
{ | ||
"name": "hydro-js", | ||
"version": "1.5.7", | ||
"version": "1.5.8", | ||
"description": "A lightweight reactive library", | ||
@@ -31,3 +31,3 @@ "type": "module", | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@types/concurrently": "^6.4.0", | ||
"@types/concurrently": "^7.0.0", | ||
"@web/test-runner": "^0.13.25", | ||
@@ -34,0 +34,0 @@ "@web/test-runner-playwright": "^0.8.8", |
@@ -33,2 +33,3 @@ <img align="right" alt="100% Coverage" src="coverage.svg"> | ||
- [Simple Counter](https://codesandbox.io/s/hydro-js-counter-mwpf4?file=/index.js) | ||
- [Reactive CSS](https://codesandbox.io/s/reactive-styles-916pr?file=/index.js) | ||
- [Two Way Data Binding](https://codesandbox.io/s/hydro-js-two-way-data-binding-observe-extpq?file=/index.js) | ||
@@ -35,0 +36,0 @@ - [Show](https://codesandbox.io/s/show-widzf?file=/index.js) |
@@ -428,3 +428,3 @@ declare global { | ||
while (childNode) { | ||
if (isTextNode(childNode)) { | ||
if (isTextNode(childNode) && childNode.nodeValue?.includes("{{")) { | ||
setReactivitySingle(childNode); | ||
@@ -445,3 +445,3 @@ } | ||
if (isTextNode(node)) { | ||
if (!key) { | ||
attr_OR_text = node.nodeValue!; // nodeValue is (always) defined on Text Nodes | ||
@@ -455,3 +455,3 @@ } else { | ||
if (attr_OR_text.startsWith("{{")) { | ||
node.removeAttribute(attr_OR_text); | ||
(node as Element).removeAttribute(attr_OR_text); | ||
} | ||
@@ -458,0 +458,0 @@ } |
283133
389