Modify ↓
Ticket #1425 (closed bug: fixed)
evalScript and global context
| Reported by: | MathieuMa | Owned by: | john |
|---|---|---|---|
| Priority: | major | Milestone: | 1.1.4 |
| Component: | core | Version: | 1.1.3 |
| Keywords: | Cc: | mathieuma@… | |
| Blocking: | Blocked by: |
Description
Since changeset 2428 ( http://dev.jquery.com/changeset/2428 ) - the scope of the scripts loaded from ajax seems to have changed.
I load some content using ajax which contains :
- A script tag containing a function declaration : var myFunction = new function(myVar) {}
- Some content
- Still in the loaded content, I call that function in a script tag : function(5);
This used to work, but now all I get is "can't find variable myFunction".
NB : I'm using trunk as I had some issues since the upgrade to 1.1.3 (which are fixed in trunk).
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
