Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

innerText fix for Firefox #100

Merged
merged 1 commit into from

2 participants

@antis

Test uses textContent if innerText undefined. (fix for Firefox)
(Spec: 'Should be able to write arbitrary HTML, including elements into tables')

@SteveSanderson SteveSanderson merged commit 011b36f into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 3 deletions.
  1. +5 −3 spec/defaultBindingsBehaviors.js
View
8 spec/defaultBindingsBehaviors.js 100755 → 100644
@@ -1,4 +1,3 @@
-
function prepareTestNode() {
var existingNode = document.getElementById("testNode");
if (existingNode != null)
@@ -142,9 +141,12 @@ describe('Binding: HTML', {
var tr = testNode.childNodes[0].childNodes[0];
if (tr.tagName == 'TBODY')
tr = tr.childNodes[0];
+
+ var td = tr.childNodes[0];
+
value_of(tr.tagName).should_be("TR");
- value_of(tr.childNodes[0].tagName).should_be("TD");
- value_of(tr.childNodes[0].innerText).should_be("hello");
+ value_of(td.tagName).should_be("TD");
+ value_of('innerText' in td ? td.innerText : td.textContent).should_be("hello");
}
});
Something went wrong with that request. Please try again.