简体   繁体   中英

Handlebar.js and Safari

I'm having an issue which I can't debug too easily. I've got this application which is rendering a specific type of file from Gists. It works well in Chrome and Firefox but in Safari and IE it doesn't render content passed in via handlebars.js - I know the template is being read correctly and inserted on the page (all those sections in the page are defined using handlebars), but the content is not there. Do you have any ideas? I searched around but didn't see any real issues with handlebars and Safari.

http://www.antarctic-design.co.uk/isafiles/isaviewer-demo.html

The problem is in line 94 ISATabViewer.js:

if (divs[div].innerHTML) {}

replace

if (divs[div].textContent) {}

Safari returns undefined , Chrome returns content. Nothing in common with handlebars

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM