Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/ratchet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2014-03-14 14:45:08 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2014-03-29 10:38:58 +0400
commit4c43c90df14f2a07e16714cb51550142d434854b (patch)
tree52e79520b289530d5b0871bb27240cf00001e245 /js
parentc4d19c80ea4f24b0ac61e53cc16aeefb4a67d24a (diff)
Use `textContent` when `innerText` is not available.
Firefox does not implement `innerText` so this led to another `TypeError`.
Diffstat (limited to 'js')
-rw-r--r--js/push.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/push.js b/js/push.js
index ea635ee..8d5e1ca 100644
--- a/js/push.js
+++ b/js/push.js
@@ -455,7 +455,8 @@
}
data.title = head.querySelector('title');
- data.title = data.title && data.title.innerText.trim();
+ var text = 'innerText' in data.title ? 'innerText' : 'textContent';
+ data.title = data.title && data.title[text].trim();
if (options.transition) {
data = extendWithDom(data, '.content', body);