Netflix / x-element

A dead simple starting point for custom elements.
Apache License 2.0
28 stars 12 forks source link

Stack trace for warnings is unhelpful. #71

Closed theengineear closed 3 years ago

theengineear commented 3 years ago

If you get a warning due to a validation issue, we create an error and then print it to the console. This isn't actually super helpful though:

Error: Unexpected key "HelloElement.properties.tabIndex" has attribute "tab-index" which is related to the inherited property "tabIndex", behavior not guaranteed.
    at Function.__validateProperties (x-element.js:307)
    at Function.__analyzeConstructor (x-element.js:254)
    at Function.get observedAttributes [as observedAttributes] (x-element.js:22)
    at index.js:84

The only important part is really the message there. We might as will shorten this a bit.

Unexpected key "HelloElement.properties.tabIndex" has attribute "tab-index" which is related to the inherited property "tabIndex", behavior not guaranteed.