Permalink
Please sign in to comment.
Browse files
Fixes #2077: workaround IE text node splitting issue that can make te…
…xt bindings fail.
- Loading branch information...
Showing
with
117 additions
and 2 deletions.
- +13 −2 src/lib/annotations/annotations.html
- +43 −0 test/smoke/ie-annotations.html
- +29 −0 test/smoke/ie-split-text.html
- +19 −0 test/unit/bind-elements.html
- +13 −0 test/unit/bind.html
15
src/lib/annotations/annotations.html
43
test/smoke/ie-annotations.html
| @@ -0,0 +1,43 @@ | ||
| +<!doctype html> | ||
| +<html> | ||
| +<head> | ||
| + | ||
| + <title>annotations</title> | ||
| + | ||
| + <meta charset="utf-8"> | ||
| + <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| + | ||
| + <script src="../../../webcomponentsjs/webcomponents-lite.js"></script> | ||
| + <link rel="import" href="../../polymer.html"> | ||
| + | ||
| +</head> | ||
| +<body> | ||
| + | ||
| + <dom-module id="my-component"> | ||
| + <template> | ||
| + <p>©</p> | ||
| + <p>{{myText}}</p> | ||
| + </template> | ||
| + </dom-module> | ||
| + | ||
| + <script> | ||
| + HTMLImports.whenReady(function() { | ||
| + Polymer({ | ||
| + is: "my-component", | ||
| + properties: { | ||
| + myText: { | ||
| + type: String, | ||
| + value: 'Sample' | ||
| + } | ||
| + }, | ||
| + }); | ||
| + }); | ||
| + </script> | ||
| + | ||
| + <h1>Bind correctly?</h1> | ||
| + | ||
| + <my-component></my-component> | ||
| + | ||
| + | ||
| +</body> | ||
| +</html> |
29
test/smoke/ie-split-text.html
| @@ -0,0 +1,29 @@ | ||
| +<!doctype html> | ||
| +<html> | ||
| +<head> | ||
| + | ||
| + <title>annotations</title> | ||
| + | ||
| + <meta charset="utf-8"> | ||
| + <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| + | ||
| + <script src="../../../webcomponentsjs/webcomponents-lite.js"></script> | ||
| + <link rel="import" href="../../src/polymer-lib.html"> | ||
| + | ||
| +</head> | ||
| +<body> | ||
| + | ||
| + <p>©</p> | ||
| + <p id="binding">{{binding}}</p> | ||
| + <h4>textNodes above</h4> | ||
| + <script> | ||
| + var c$ = binding.childNodes; | ||
| + for (var i=0; i < c$.length; i++) { | ||
| + var d = document.createElement('div'); | ||
| + d.innerHTML = c$[i].textContent; | ||
| + document.body.appendChild(d); | ||
| + } | ||
| + </script> | ||
| + | ||
| +</body> | ||
| +</html> |
19
test/unit/bind-elements.html
13
test/unit/bind.html
0 comments on commit
312d11f