Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363494 - Consider using strict mode in JavaScript
Summary: Consider using strict mode in JavaScript
Status: RESOLVED WONTFIX
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 11:19 EST by Ralf Sternberg CLA
Modified: 2012-01-07 20:07 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Sternberg CLA 2011-11-10 11:19:18 EST
Enabling strict mode could help us to improve the quality of our JavaScript code. We could experimentally render the "use strict;" statement it in development mode and see what happens...

See https://developer.mozilla.org/en/JavaScript/Strict_mode
Comment 1 Ralf Sternberg CLA 2012-01-07 20:07:19 EST
I tried to enable strict mode but found that parts of qooxdoo do not comply. For example, certain features like the arguments.callee property are not supported in strict mode.

While exploring JSHint, I found that global strict mode is not even a recommended practice as it might break third-party widgets on the site. As an alternative, it's possible to enable strict mode within functions. As there's also a jshint options to enforce this, we will look into it as part of bug 311150.