From d54cec65411db267d243619533ccc3f8018751da Mon Sep 17 00:00:00 2001 From: Markleford Date: Sun, 20 Apr 2014 12:57:06 -0400 Subject: [PATCH] Switch .innerText DOM output to .textContent .innerText started as an IE-ism, but .textContent is the WC3 standard. Eventually, IE9+ supported textContent, but Firefox stood firm (or "stubborn") on NOT supporting innerText. As stands, innerText will break this example for modern Firefox browsers, and I don't believe that punishing IE8 users is necessarily a bad thing. ;) Mind, there's ways to normalize use of this property for maximum browser compat, but I believe the spirit of this example is to keep the code as lean as possible. --- examples/chat/client/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/chat/client/app.js b/examples/chat/client/app.js index da113c7..e80abe1 100644 --- a/examples/chat/client/app.js +++ b/examples/chat/client/app.js @@ -9,13 +9,13 @@ cloak.configure({ messages: { chat: function(msg) { var message = document.createElement('div'); - message.innerText = msg; + message.textContent = msg; message.className = 'msg'; messages.appendChild(message); messages.scrollTop = messages.scrollHeight; }, userCount: function(count) { - counter.innerText = count; + counter.textContent = count; } }, });