Skip to content

Commit

Permalink
fix: 修复 HTMLElement 构造函数上下文 (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
yenshih committed Mar 6, 2019
1 parent 3cfda8f commit ff35097
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/mip/src/base-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ function isInternalNode (node) {
}

class BaseElement extends HTMLElement {
constructor () {
super()
/**
* @param {?HTMLElement} element
* @see {@link https://github.com/WebReflection/document-register-element#v1-caveat}
*/
constructor (element) {
super(element)

/** @private {string} */
this.name = this.tagName.toLowerCase()
Expand Down

0 comments on commit ff35097

Please sign in to comment.