Closed
Bug 1070717
Opened 10 years ago
Closed 10 years ago
JS Function isn't hoisted properly in an iframe (jsbin.com)
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 434912
People
(Reporter: piotrpalek, Unassigned)
References
()
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0
Build ID: 20140911151253
Steps to reproduce:
Tried to run code on this jsbin: http://jsbin.com/qasace/1/edit
Actual results:
It says "ReferenceError: assertEqualArrays is not defined"
Expected results:
The code should run, most importantly the assertEqualArrays function should be hoisted so it's available before it's defined.
Reporter | ||
Comment 1•10 years ago
|
||
Ok, probably not a bug it seems I don't know Javascript:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Scope_Cheatsheet#function_oddities
:)
Comment 2•10 years ago
|
||
Not that dumb, there's an open bug, with a comment from Brendan that ES4 was going to change this... maybe the spec changed course, or you need to opt-in with a version param in your script's type attribute? Let's find out on the dupe... :-)
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•