-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fixes #4357. #4360
Fixes #4357. #4360
Conversation
…lement. The `importPath` property defaults to the path part of the url containing the dom-module matching the element's static `is` property. The `rootPath` property is set to the `Polymer.rootPath` property and defaults to the path part of the main document url. These properties can be used in bindings to url's. The `importPath` property is used to scope url's in element styles. [Note, this depends on webcomponents/html-imports#44].
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.
- Add to README breaking change list
- Confirmed perf impact?
lib/mixins/element-mixin.html
Outdated
* Defaults to the path matching the url containing a `dom-module` element | ||
* matching this element's static `is` property. | ||
* Note, this path does not contain a trailing `/`. | ||
*/ |
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.
@returns {string}
@@ -392,13 +392,16 @@ | |||
* style scoping. | |||
* @param {HTMLElement} proto | |||
* @param {HTMLTemplateElement} template | |||
* @param {string} baseURI URL against which to resolve urls in | |||
* style element cssText. |
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.
@returns {HTMLTemplateElement}
} | ||
super._initializeProperties(); | ||
// set path defaults | ||
this.rootPath = Polymer.rootPath; | ||
this.importPath = importPath; |
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.
Reminder to discuss why it was bad if these went before initializeProperties
// support user settings on the Polymer object | ||
if (userPolymer) { | ||
Object.assign(Polymer, userPolymer); | ||
} |
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.
Just noting, this fixes the ability to set Polymer.sanitizeDOMValue
before loading polymer, closing a loophole where it's conceivable that main-document e.g. dom-repeat
's could upgrade before the sanitization hook is installed. 👍
lib/utils/resolve-url.html
Outdated
return (new URL(url, baseURI)).href; | ||
} | ||
// Fallback to creating an anchor into a disconnected document. | ||
let doc = tempDoc; |
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.
Why this indirection?
Also, looks like there's some Linux 41 issue |
* `importPath` can now be a path fragment (e.g. `foo/`)
Adds
importPath
androotPath
properties to Polymer.Element. TheimportPath
property defaults to the path part of the url containing the dom-module matching the element's staticis
property. TherootPath
property is set to thePolymer.rootPath
property and defaults to the path part of the main document url. These properties can be used in bindings to url's. TheimportPath
property is used to scope url's in element styles. [Note, this depends on this html-imports pr ].