Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 406801

Summary: [Scripting] 'use strict' not supported in ClientListener
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 2.1   
Target Milestone: 2.2 M1   
Hardware: All   
OS: All   
Whiteboard:

Description Tim Buschtoens CLA 2013-04-29 10:42:25 EDT
JavaScript "strict" mode as supported in modern browser prevents a number of common JavaScript mistakes, but can not be used with ClientScripting because " eval of strict mode code does not introduce new variables into the surrounding scope."[1]

[1] https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode

To support strict mode, the script should be modified before it is eval'd to retrieve the handleEvent function.
Comment 1 Tim Buschtoens CLA 2013-08-29 09:56:10 EDT
Has been fixed when Scripting was moved to the core. Writing "use strict"; before the handleEvent function gives the entire script strict mode.