Skip to content

Better error when creating an element without a hyphenated name #303

Description

@wibblymat

If you run the following example, you get an error because the custom element does not have a hyphen in the name.

index.html

<html>
<script src="polymer-v0.0.20130912/polymer-v0.0.20130912.min.js"></script>
<link rel="import" href="element.html">
<element/>

element.html

<polymer-element name="element">
    <template>
    </template>
    <script>Polymer('element');</script>
</polymer-element>

However, the error has no message, so if you do this by accident it is difficult to work out what has gone wrong.

Error message

Activity

  1. ghost assigned on Oct 2, 2013
  2. dfreedm commented on Oct 3, 2013

    @dfreedm
    Member

    The error message does have a useful message as of googlearchive/CustomElements@315f9a4.

    It looks like the build ate the nice message for some reason.
    From my initial testing, it seems to have been fixed it in trunk.

    Should be fixed in today's release version.

  3. ghost assigned on Oct 8, 2013
  4. KubaBest commented on Jul 16, 2014

    @KubaBest

    Currently, creating custom element without hyphen in the name ends with Uncaught Error:

    test_log

    Which I think is enough descriptive to understand what we have done wrong, so an issue can be closed now.

  5. dfreedm commented on Jul 16, 2014

    @dfreedm
    Member

    Agreed, thx

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

Metadata

Metadata

Assignees

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