webmodules / jsonp

A simple JSONP implementation
1.91k stars 332 forks source link

make IE <=8 happy #1

Closed gjohnson closed 11 years ago

gjohnson commented 11 years ago

make IE <=8 happy

rauchg commented 11 years ago

I wonder if we should do document.getElementsByTagName('HEAD')[0] instead?

gjohnson commented 11 years ago

In my case its for third-party javascript so you can't always rely on the head being there. :-(

http://www.jspatterns.com/the-ridiculous-case-of-adding-a-script-element/

gjohnson commented 11 years ago

Though (if your cool with it) we could move it up out of the function and cache it.

rauchg commented 11 years ago

Good source @gjohnson Thanks a lot for the pro-tip.