Closed phani1kumar closed 7 years ago
It seems the iron-component-page
currently does not parse custom elements that are defined with class expressions like this:
customElements.define('my-element', class extends Polymer.Element {
static get is() { return 'my-element'; }
static get config() {
return {
properties: {
prop1: {
type: String,
value: 'my-element'
}
}
};
}
});
Rewriting it as a class declaration (as shown below) allows the iron-component-page
to parse the docs for the element. iron-component-page
still does not parse the docs for the properties declared in config()
.
class MyElement extends Polymer.Element {
static get is() { return 'my-element'; }
static get config() {
return {
properties: {
prop1: {
type: String,
value: 'my-element'
}
}
};
}
}
customElements.define(MyElement.is, MyElement);
Thank you @tony19 , I tested this and it works fine. Apologies for a late response on this one.
Description
Created a polymer 2.0 component using
polymer init 2-x-el
this generator I've got from https://www.npmjs.com/package/generator-polymer-init-2-x-elAfter creating the element, changed the ../polymer/polymer.html to ../polymer/polymer-element.html
Ran
polymer serve
Expected outcome
The new blank element template is shown. But it fails with "No documentation found"
Actual outcome
"No documentation found" is displayed
Steps to reproduce
polymer init 2-x-el
polymer serve
./components/kkk-homepage.html
custom-element from the components re-mapped url. -->Browsers Affected