method parseDeclaration


void parseDeclaration(Element elementElement)

Perform init-time actions based on static information in the <polymer-element> instance argument.

For example, the standard implementation locates the template associated with the given <polymer-element> and stamps it into a shadow-root to implement shadow inheritance.

An element may override this method for custom behavior.

Source

void parseDeclaration(Element elementElement) {
  var template = fetchTemplate(elementElement);

  if (template != null) {
    var root = shadowFromTemplate(template);

    var name = elementElement.attributes['name'];
    if (name == null) return;
    shadowRoots[name] = root;
  }
}