Comments (4)
Thanks Johan. Here is an update which should fix that issue:
The change is line 5517 and 5512:
while (deferChar = deferPath.charAt(j--)) {
// Use the "+" and"-" characters to navigate the path back to the original parent node where the deferred bindings ocurred
if (deferChar === "+") {
if (deferPath.charAt(j) === "-") {
j--;
targetParent = targetParent.previousElementSibling; // IE9 or later only
} else {
targetParent = targetParent.parentNode;
}
} else {
targetParent = targetParent.lastElementChild; // IE9 or later only
}
But <IE9 did not support those APIs. I guess at this point we can remove support for IE8 without concern.... Otherwise we would need to add a polyfill, or equivalent...
Let me know if it works for you...
from jsviews.
Works like a charm, thanks!
At this point one would hope IE8 is not a concern. I think you can do as you did with unicode support and place polyfills in a separate file to prevent cluttering the main js file(s). I.e. jsviews.ie8.js, jsviews.ie9.js...
That would give you more freedom to use more modern apis and remain backwards compatible.
I note that there are polyfills on MDN:
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/lastElementChild
https://developer.mozilla.org/en-US/docs/Web/API/NonDocumentTypeChildNode/previousElementSibling
Interestingly its stated that previousElementSibling is only partially supported for IE9.
from jsviews.
I have been considering the jsviews.ie8.js idea, but I'm inclined to limit backward compat goals to IE9, not IE8.
Currently all the code should be IE9 compatible, including the new code from this fix. (My tests all pass in IE9).
OTOH, there are a few features (such as sort and filter on the {{for}}
tag) which already fail in IE8. If I provide a polyfill, then I would need to commit to testing in IE8 with the polyfill included. I'd prefer not to add to the testing matrix. (IE8 has a lot of inconsistent white-space rendering that makes testing more time consuming.)
That said, when users encounter the fact that Array.map or element.previousElementSibling are undefined in IE8, they are clearly free to add a polyfill themselves (and would need to test it in their environment....)
from jsviews.
This has been resolved in v1.0.11.
from jsviews.
Related Issues (20)
- observable ev.data.observeAll helper broken when path is "*" HOT 7
- linked tag property changed handler called when it shouldn't HOT 51
- {{for ..}} emits <tr> and <td> tags HOT 1
- for tag with range and data-linked tr give error when removing object from array HOT 5
- Delimiters not working for "[ " and " ]" HOT 2
- linking of selected value on select element does not work correctly with all jquery versions HOT 5
- jsrender.min.js.map truncated HOT 6
- Observable change error, when loading jquery.observable.js before jsrender.js, and using contextual parameters and sorted {{for}} HOT 6
- removeView performance HOT 2
- $.observe/$.unobserve performance degradation over time HOT 5
- If the selected value of a data-linked <select> is set prior to adding options, selection is not always established correctly HOT 3
- multiselect not updating when linked array changes HOT 10
- Binding to computed functions: onBind callback called twice. If computed function has no setter , "... is not a function" exception thrown HOT 6
- performance improvement in JsObservable HOT 2
- Formatting a number in data-link ? HOT 2
- Using a tmpl selector that begins with a # but is not an ID selector does not work HOT 5
- Top-level data-link="{for...}" does not work on a 'select' element HOT 3
- LinkTo not refreshing DOM on empty value HOT 5
- Checkboxgroup enhancement and oldValue issue HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsviews.