i18n-number
Advanced tools
Comparing version 3.0.0-pre.8 to 3.0.0-pre.9
@@ -466,3 +466,11 @@ /** | ||
_setupObservers: function () { | ||
this.textNode = dom(this).childNodes[0]; | ||
let i = 0; | ||
do { | ||
this.textNode = dom(this).childNodes[i++]; | ||
if (!this.textNode) { | ||
this.textNode = dom(this).childNodes[0]; | ||
break; | ||
} | ||
} | ||
while (this.textNode.nodeType !== this.textNode.TEXT_NODE); | ||
if (!this.textNode) { | ||
@@ -476,9 +484,15 @@ dom(this).appendChild(document.createTextNode('')); | ||
this.nodeObserver = dom(this).observeNodes(function (info) { | ||
if (info.addedNodes[0] && | ||
info.addedNodes[0].nodeType === info.addedNodes[0].TEXT_NODE) { | ||
this.textNode = info.addedNodes[0]; | ||
this.raw = this.textNode.data; | ||
//console.log('i18n-number: text node added with ' + this.raw); | ||
this.observer.observe(this.textNode, { characterData: true }); | ||
let i = 0; | ||
do { | ||
if (info.addedNodes[i] && | ||
info.addedNodes[i].nodeType === info.addedNodes[i].TEXT_NODE) { | ||
this.textNode = info.addedNodes[i]; | ||
this.raw = this.textNode.data; | ||
//console.log('i18n-number: text node added with ' + this.raw); | ||
this.observer.observe(this.textNode, { characterData: true }); | ||
break; | ||
} | ||
i++; | ||
} | ||
while (i < info.addedNodes.length); | ||
}.bind(this)); | ||
@@ -485,0 +499,0 @@ }, |
@@ -18,3 +18,3 @@ { | ||
"name": "i18n-number", | ||
"version": "3.0.0-pre.8", | ||
"version": "3.0.0-pre.9", | ||
"main": "i18n-number.js", | ||
@@ -21,0 +21,0 @@ "directories": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
269652
5619