This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18841 - [Custom]: "extends" is an ECMAScript reserved word; don’t use it as an attribute name
Summary: [Custom]: "extends" is an ECMAScript reserved word; don’t use it as an attrib...
Status: RESOLVED INVALID
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 17103
  Show dependency treegraph
 
Reported: 2012-09-11 23:40 UTC by Dominic Cooney
Modified: 2012-10-24 20:10 UTC (History)
1 user (show)

See Also:


Attachments

Description Dominic Cooney 2012-09-11 23:40:13 UTC
"extends" is a reserved word in JavaScript and illegal in strict mode. Thus it is inconvenient to access the HTMLElementElement.extends attribute from JavaScript. Consider using a different name.
Comment 1 Dimitri Glazkov 2012-10-24 19:54:30 UTC
Isn't it only illegal as a variable? I think it still totally works as an property name: http://jsfiddle.net/pQa2w/
Comment 2 Erik Arvidsson 2012-10-24 20:10:37 UTC
Property names are using the IdentifierName production which allows reserved keywords:

Identifier ::
  IdentifierName but not ReservedWord

IdentifierName ::
  IdentifierStart
  IdentifierName IdentifierPart

Other productions, like variable bindings and function name bindings uses the Identifier production which may not include reserved keywords.