Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make template compiler emit element namespace #1136

Open
pmdartus opened this issue Mar 26, 2019 · 0 comments
Open

Make template compiler emit element namespace #1136

pmdartus opened this issue Mar 26, 2019 · 0 comments
Labels

Comments

@pmdartus
Copy link
Member

In order to support SVG tags in the template, the engine traverses it's VNodes when evaluating the template and adds the namespace to each VNode. This is work that can be off-loaded to the compiler.

if (
sel.length === 3 &&
StringCharCodeAt.call(sel, 0) === CHAR_S &&
StringCharCodeAt.call(sel, 1) === CHAR_V &&
StringCharCodeAt.call(sel, 2) === CHAR_G
) {
addNS(vnode);
}

Another benefit of doing this is that LWC would support MathML elements which is not the case today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant