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

Bug 353198

Summary: False positive when validating JS within HTML attributes
Product: [WebTools] JSDT Reporter: Janek Lasocki-Biczysko <janek.lb>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: CLOSED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Janek Lasocki-Biczysko CLA 2011-07-27 06:50:20 EDT
Build Identifier: 20110527214303

Any html attributes that reference DOM events (onclick, onmousedown, onsubmit) aren't validated properly when a return value is included.
The following error is displayed: 'Cannot return from outside a function or method.'

Reproducible: Always

Steps to Reproduce:
1. create a file with some HTML
2. add this: <form onsubmit="return false;"></form>
3. 'return false;' will get underlined and annotated with the error
Comment 1 Nitin Dahyabhai CLA 2011-07-27 13:41:44 EDT

*** This bug has been marked as a duplicate of bug 353209 ***