Skip to content

Using a keyword in attribute name causes error in IE11 #466

Description

@warpech

When I use a preserved HTML attribute name as one of the Polymer Element attributes, e.g.

<polymer-element name="my-elem" noscript attributes="language">
<polymer-element name="my-elem" noscript attributes="lang">
<polymer-element name="my-elem" noscript attributes="title">

Internet Explorer 11 shows exception:

TypeError: Unable to get property 'title' of undefined or null reference TypeError: Unable to get property 'title' of undefined or null reference
   at Function code (Function code:1:1)
   at publishAttributes (http://rawgithub.com/Polymer/polymer/master/polymer.js:32:18104)
   at desugarBeforeChaining (http://rawgithub.com/Polymer/polymer/master/polymer.js:32:19080)
   at buildPrototype (http://rawgithub.com/Polymer/polymer/master/polymer.js:32:18924)
   at register (http://rawgithub.com/Polymer/polymer/master/polymer.js:32:18749)
   at _register (http://rawgithub.com/Polymer/polymer/master/polymer.js:32:23549)
   at go (http://rawgithub.com/Polymer/polymer/master/polymer.js:32:21656)
   at registerWhenReady (http://rawgithub.com/Polymer/polymer/master/polymer.js:32:23342)
   at d (http://rawgithub.com/Polymer/polymer/master/polymer.js:32:12684)
   at b (http://rawgithub.com/Polymer/polymer/master/polymer.js:32:12635)

I am not sure if this is a bug (perhaps using a reserved HTML attribute name is not a good practice), but somehow this does not raise an error in Chrome nor Firefox.

JsFiddle to reproduce the issue: http://jsfiddle.net/warpech/TJhWP/1/

Activity

  1. sjmiles commented on Apr 4, 2014

    @sjmiles
    Contributor

    Duplicates #379

  2. warpech commented on Apr 4, 2014

    @warpech
    Author

    Sorry, I thought I searched for possible duplicate.

  3. sjmiles commented on Apr 4, 2014

    @sjmiles
    Contributor

    No worries, we need to get this fixed. Another ticket for it increases the priority.

  4. sorvell commented on Aug 12, 2014

    @sorvell
    Contributor

    Closed in favor of #379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions