Reputation: 5978
I'm getting this error in safari console when I try to do anything from a breakpoint. Bug report here: https://bugs.webkit.org/show_bug.cgi?id=83267
Does anyone have a workaround? For reasons that I am assuming are related to this javascript has ceased to run on my site in safari.
edit: the bug report also contains repro steps.
another edit: I'm not using a "with" statement. This is a bug from the safari console.
Upvotes: 19
Views: 15955
Reputation: 137320
Strict mode in ECMAScript 5 bans eg. with
statement. You have two choices:
"strict mode";
line from the file / function), orwith
statements - they are harmful and totally unreadable.More on strict mode from John Resig: ECMAScript 5 Strict Mode, JSON, and More.
You can read in the article, that strict mode:
delete
variable (like in delete foo;
),eval
,caller
and callee
),with
statements,Upvotes: 3
Reputation: 97571
The with(obj) {}
statement is deprecated, and as such, is not valid in strict mode.
To solve this, either disable strict mode, or stop using with statements!
Upvotes: 9