Skip to content

Commit

Permalink
Update externs again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Oct 19, 2017
1 parent 8683b27 commit 1c5b731
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions externs/closure-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,8 @@ Polymer_ElementMixin.finalize = function(){};
Polymer_ElementMixin._processStyleText = function(cssText, baseURI){};
/**
* @param {string} is Tag name (or type extension name) for this element
* @param {string=} ext For type extensions, the tag name that was extended
*/
Polymer_ElementMixin._finalizeTemplate = function(is, ext){};
Polymer_ElementMixin._finalizeTemplate = function(is){};
/**
* @interface
*/
Expand Down
10 changes: 4 additions & 6 deletions lib/mixins/element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,10 @@
* @param {PolymerElementConstructor} klass Element class
* @param {!HTMLTemplateElement} template Template to process
* @param {string} is Name of element
* @param {string} ext Name of native element
* @param {string} baseURI Base URI for element
* @private
*/
function processElementStyles(klass, template, is, ext, baseURI) {
function processElementStyles(klass, template, is, baseURI) {
const styles = Polymer.StyleGather.stylesFromModuleImports(is).concat(
Polymer.StyleGather.stylesFromTemplate(template));
let templateStyles = template.content.querySelectorAll('style');
Expand All @@ -426,7 +425,7 @@
s.textContent = klass._processStyleText(s.textContent, baseURI);
}
if (window.ShadyCSS) {
window.ShadyCSS.prepareTemplate(template, is, ext);
window.ShadyCSS.prepareTemplate(template, is);
}
}

Expand Down Expand Up @@ -626,18 +625,17 @@
* style scoping.
*
* @param {string} is Tag name (or type extension name) for this element
* @param {string=} ext For type extensions, the tag name that was extended
* @protected
*/
static _finalizeTemplate(is, ext) {
static _finalizeTemplate(is) {
/** @const {HTMLTemplateElement} */
const template = this.prototype._template;
if (template && !template.__polymerFinalized) {
template.__polymerFinalized = true;
const importPath = this.importPath;
const baseURI = importPath ? Polymer.ResolveUrl.resolveUrl(importPath) : '';
// e.g. support `include="module-name"`, and ShadyCSS
processElementStyles(this, template, is, ext, baseURI);
processElementStyles(this, template, is, baseURI);
this.prototype._bindTemplate(template);
}
}
Expand Down

0 comments on commit 1c5b731

Please sign in to comment.