-
Notifications
You must be signed in to change notification settings - Fork 12
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
Compatibility fix for hybrid views for Polymer 1 and 2 #37
Conversation
…nd"> if it is wrapped in <dom-bind>. This makes it impossible to have hybrid views for Polymer 1 and 2 Solution: apply the mirrored version of the Polymer's own solution for this problem: https://github.com/Polymer/polymer/pull/4537/files
|
||
//mirrored implementation of this fix: https://github.com/Polymer/polymer/pull/4537/files | ||
const firstElemChild = elem.firstElementChild; | ||
if (firstElemChild && firstElemChild.getAttribute("is") === elem.localName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we fine to do this for <foo><bar is="foo">
as well? (Polymer implements it in dom-*
elements only, so by design they are filtering only those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you know Polymer implements it in dom-*
elements only? Looking here it seems that they do it for any element names.
I think it is fine. If it becomes a problem, we can do a hot fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why it works only for dom-*
elements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you paste a link to a line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets hope <foo><bar is="foo">
will not become a feature by that time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that LGTM
Setting as “Finished” because it is:
|
Problem:
juicy-html
does not assign the model to<template is="dom-bind">
if it is wrapped in<dom-bind>
. This makes it impossible to have hybrid views for Polymer 1 and 2Solution: apply the mirrored version of the Polymer's own solution for this problem: https://github.com/Polymer/polymer/pull/4537/files
This was discussed in https://starcounter.slack.com/archives/C5PEXSXQE/p1513614571000221