You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like there's a bug in Uize.Node.injectHtml in Safari. When trying to inject some markup, only top-level script tags are evaluated. Any nested tags are ignored. This has caused some problems while dynamically loading content (such as a dialog) into a page. I've thrown together a quick demonstration page at: http://timcarter.github.com/bugs/injectscript.html.
On that page, Firefox, Chrome, and IE throw two alerts while Safari throws only one. The first alert is contained in the top-level script tag while the second is nested one level under a
tag.
The text was updated successfully, but these errors were encountered:
I've isolated the problem to the _fixCrippledScripts function in Uize.Node.injectHtml. The else-if clause in that function uses Uize.forEach, which in turn only executes the _iterationHandler if the _source parameter is an array, object, or number. In all browsers except Safari, the child node list passed as the _source parameter is an object; in Safari it's a function.
My suggestion is to change the _isObject check in Uize.forEach to use the new canExtend method, similar to how you modified Uize.copyInto last week.
It looks like there's a bug in Uize.Node.injectHtml in Safari. When trying to inject some markup, only top-level script tags are evaluated. Any nested tags are ignored. This has caused some problems while dynamically loading content (such as a dialog) into a page. I've thrown together a quick demonstration page at: http://timcarter.github.com/bugs/injectscript.html.
On that page, Firefox, Chrome, and IE throw two alerts while Safari throws only one. The first alert is contained in the top-level script tag while the second is nested one level under a
tag.
The text was updated successfully, but these errors were encountered: