LeaVerou / inspire.js

Lean, hackable, extensible slide deck framework. Previously known as CSSS.
https://inspirejs.org
MIT License
1.73k stars 254 forks source link

compatibility fix for firefox 3.6 #14

Closed cherouvim closed 12 years ago

cherouvim commented 12 years ago

I had document.head is undefined appearing in my firebug console.

LeaVerou commented 12 years ago

Since this is a tool for web developers, Firefox 3.6 isn't in the target browsers. We're on Firefox 6 now. However, I wouldn't say no to a small fix like that. But, in this case, it's also inefficient: You're querying for 'head' multiple times, at least twice per slide that uses this. It's best to just do document.head || (document.head = ...); somewhere in the beginning of the document (maybe even in slideshow.js). Then, references to document.head will work just fine, and it will be a tiny one-time cost.