Browse Source

Use `textContent` when `innerText` is not available.

Firefox does not implement `innerText` so this led to another `TypeError`.
pull/518/head
XhmikosR 11 years ago
parent
commit
4c43c90df1
  1. 3
      dist/js/ratchet.js
  2. 2
      dist/js/ratchet.min.js
  3. 3
      docs/dist/js/ratchet.js
  4. 2
      docs/dist/js/ratchet.min.js
  5. 3
      js/push.js

3
dist/js/ratchet.js vendored

@ -590,7 +590,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);

2
dist/js/ratchet.min.js vendored

File diff suppressed because one or more lines are too long

3
docs/dist/js/ratchet.js vendored

@ -590,7 +590,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);

2
docs/dist/js/ratchet.min.js vendored

File diff suppressed because one or more lines are too long

3
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);

Loading…
Cancel
Save