diff --git a/lib/elements/dom-module.js b/lib/elements/dom-module.js index 4f68eb4026..76b801ebe5 100644 --- a/lib/elements/dom-module.js +++ b/lib/elements/dom-module.js @@ -14,12 +14,25 @@ import { strictTemplatePolicy } from '../utils/settings.js'; let modules = {}; let lcModules = {}; +/** + * Sets a dom-module into the global registry by id. + * + * @param {string} id dom-module id + * @param {DomModule} module dom-module instance + * @return {void} + */ function setModule(id, module) { // store id separate from lowercased id so that // in all cases mixedCase id will stored distinctly // and lowercase version is a fallback modules[id] = lcModules[id.toLowerCase()] = module; } +/** + * Retrieves a dom-module from the global registry by id. + * + * @param {string} id dom-module id + * @return {DomModule!} + */ function findModule(id) { return modules[id] || lcModules[id.toLowerCase()]; } @@ -133,7 +146,7 @@ export class DomModule extends HTMLElement { id = id || this.id; if (id) { // Under strictTemplatePolicy, reject and null out any re-registered - // dom-module since it is ambiguous whether first-in or last-in is trusted + // dom-module since it is ambiguous whether first-in or last-in is trusted if (strictTemplatePolicy && findModule(id) !== undefined) { setModule(id, null); throw new Error(`strictTemplatePolicy: dom-module ${id} re-registered`); diff --git a/lib/utils/boot.js b/lib/utils/boot.js index 4b8c6cdc87..d2bce39263 100644 --- a/lib/utils/boot.js +++ b/lib/utils/boot.js @@ -15,7 +15,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN * * @param {string} prop Property name * @param {?Object} obj Reference object - * @return {string} Dereferenced value + * @return {string} Potentially renamed property name */ window.JSCompiler_renameProperty = function(prop, obj) { return prop; diff --git a/lib/utils/debounce.js b/lib/utils/debounce.js index ba41f61aec..eac7dd0ee8 100644 --- a/lib/utils/debounce.js +++ b/lib/utils/debounce.js @@ -76,7 +76,7 @@ export class Debouncer { * called once. Add this method to a custom element: * * ```js - * import {microtask} from '@polymer/polymer/lib/utils/async.js'; + * import {microTask} from '@polymer/polymer/lib/utils/async.js'; * import {Debouncer} from '@polymer/polymer/lib/utils/debounce.js'; * // ... * diff --git a/lib/utils/templatize.js b/lib/utils/templatize.js index de2908d700..a28bae35c6 100644 --- a/lib/utils/templatize.js +++ b/lib/utils/templatize.js @@ -170,6 +170,7 @@ class TemplateInstanceBase extends base { /** * Override point for adding custom or simulated event handling. * + * @override * @param {!Node} node Node to add event listener to * @param {string} eventName Name of event * @param {function(!Event):void} handler Listener function to add @@ -247,6 +248,7 @@ class TemplateInstanceBase extends base { * textContent bindings while children are "hidden" and cache in * private storage for later retrieval. * + * @override * @param {!Node} node The node to set a property on * @param {string} prop The property to set * @param {*} value The value to set diff --git a/polymer-element.js b/polymer-element.js index 7188e01b73..a79d5293c9 100644 --- a/polymer-element.js +++ b/polymer-element.js @@ -25,6 +25,7 @@ export { html } from './lib/utils/html-tag.js'; * @summary Custom element base class that provides the core API for Polymer's * key meta-programming features including template stamping, data-binding, * attribute deserialization, and property change observation + * @const */ export const PolymerElement = ElementMixin(HTMLElement);