Skip to content

super.disconnectedCallback() is no longer present #212

@Westbrook

Description

@Westbrook

Description

super.disconnectedCallback() having been removed from LitElement puts pressure on the element developer to make a clear decision as to how to address the possible presence of this method at various extension and mixin levels. Further, it makes for the possibility that there would need to be a future breaking change in LitElement where core functionality needed in this callback.

Live Demo

https://glitch.com/edit/#!/five-latex?path=index.html:39:50

Steps to Reproduce

  1. Create an element
  2. Add a disconnectedCallback method.
  3. Call super.disconnectedCallback() in it.
  4. Disconnect the element and see the error.

Expected Results

No error. Or clear documentation of the approach to this.

Actual Results

Uncaught TypeError: (intermediate value).disconnectedCallback is not a function
at HTMLElement.disconnectedCallback ((index):25)
at (index):36

Browsers Affected

  • Chrome
  • Firefox
  • Edge
  • Safari 11
  • Safari 10
  • IE 11

Versions

  • lit-element: ^0.6.0
  • webcomponents: latest

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions