Skip to content

Commit

Permalink
Merge pull request #518 from twbs/innerText
Browse files Browse the repository at this point in the history
Use `textContent` when `innerText` is not available.
  • Loading branch information
XhmikosR committed Apr 1, 2014
2 parents acdeb65 + 4c43c90 commit 62f5f9f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dist/js/ratchet.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,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);
Expand Down
Loading

0 comments on commit 62f5f9f

Please sign in to comment.