caridy / yui3-gallery

YUI3 Gallery Modules
http://yuilibrary.com/gallery
17 stars 3 forks source link

Dispatcher doesn't execute inline scripts in Firefox 4 #7

Open blt04 opened 13 years ago

blt04 commented 13 years ago

Dispatcher doesn't execute inline scripts in Firefox 4 beta 8. The attached pull request fixes the issue. The pull request also fixes some bugs in the test suite that caused all tests to pass regardless of assertions.

The underlying problem is that Firefox 4 doesn't execute script tags inserted via innerHTML. Dispatcher uses Y.Node.create('<script></script>') which uses innerHTML.

I realize Firefox 4 isn't a graded browser yet, however this issue may come in to play when it is released in a few months.

More info on HTML5's spec about script tags inserted via innerHTML: http://www.whatwg.org/specs/web-apps/current-work/#scriptTag

More info on Firefox 4's implementation: https://bugzilla.mozilla.org/show_bug.cgi?id=395597#c13

dbu commented 13 years ago

thanks blt04, we needed this and it fixed our problem.

this should really go into the main yui3 repository as well, with firefox 4 now being public and getting used.