h5o / h5o-chrome

HTML5 outliner (Chrome extension)
MIT License
119 stars 30 forks source link

Custom elements seems to expect a name #10

Closed AndreasHeintze closed 9 years ago

AndreasHeintze commented 9 years ago

If I have custom tags in my HTML where the name of the tag starts with nav, then HTML5 outliner seems to think this is a nav element and therefore it expects a name to be set. This must be wrong, isn't it?

<nav-bar>
    <nav-megamenu></nav-megamenu>
    <nav-megamenu></nav-megamenu>
    <nav-megamenu></nav-megamenu>
</nav-bar>
skarmavbild 2015-08-02 kl 13 25 42
dominykas commented 9 years ago

The outliner checks for the tagName with a regex: https://github.com/h5o/h5o-js/blob/master/src/utils.js#L51 - the regex does have a ^ and a $ in there to do an exact (not a partial) match, so I wonder - how do you construct these elements? Are you extending nav? What's the actual tagName that you see in dev tools for them?

AndreasHeintze commented 9 years ago

Here is a quick and simple example: http://fiddle.jshell.net/AndreasHeintze/z7hm3xdm/2/show/

I'm using RiotJS.

dominykas commented 9 years ago

Thanks, will take a look.

dominykas commented 9 years ago

Fixed in 0.8.13 - available via direct install (see releases here) or as soon as Google approve it on web store.

AndreasHeintze commented 9 years ago

Thanks!