#9126 closed bug (fixed)
jquery breaks on use strict
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.6.1 |
Component: | data | Version: | 1.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
in strict it throws an error on line 1948 "name is not defined"
And it here is the code: name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
And yes, name is introduced without 'var'
Change History (5)
comment:1 Changed 12 years ago by
Component: | unfiled → data |
---|---|
Milestone: | 1.next → 1.6.1 |
Priority: | undecided → low |
Resolution: | → fixed |
Status: | new → closed |
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
There are other places in the 1.6.1 code where a global "name" variable is changed still; the window's name is still being overwritten. For example, on line 1607, you have the line:
name = attr[i].name;
And on 1610:
name = jQuery.camelCase( name.substring(5) );
I suggest this is reopened.
comment:5 Changed 12 years ago by
The commit that fixed the issue in this ticket was https://github.com/jquery/jquery/commit/c864455ccfad13895d2af6ba287f265ee64bd348 and is present in 1.6.1.
#9241 is a duplicate of this ticket.