Skip to content

tagName is not always UPPERCASE #5

@nullterminated

Description

@nullterminated

Hi. Great work. I like this solution. I found a bug though. It looks like an easy fix.

At the following line, LINK is sometimes link. I'm not sure why, but it is.

muJS/lib/mu.js

Line 1574 in ba8c160

if (el.tagName === "LINK")

Which means I'm getting lots of duplicate <link /> elements in my <head>. Most importantly, not always, so my css is repeated, but out of order and cascaded styles break. Perhaps if you do an el.tagName.toUpperCase() here before the comparisons, that should fix the problem. I suspect if it's a problem with LINK, it could be a problem with STYLE and SCRIPT and the 9-10 other places in the script where el.tagName is compared directly to uppercase tag names.

Thank you again.

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