Fork me on GitHub
#hoplon
<
2016-12-16
>
piotrek12:12:45

I was looking at the guide for integrating material components (https://github.com/material-components/material-components-web/blob/master/docs/integrating-into-frameworks.md#the-simple-approach-wrapping-mdc-web-vanilla-components) and it mentions that the wrapping component (e.g. like in hoplon) must call the material component’s .destroy() to clean it up

piotrek12:12:24

Is it possible to register a hook in Hoplon for an element being removed from the DOM?

alandipert13:12:11

@piotrek not that I'm aware of but this has come up before

alandipert13:12:13

It might be possible without Hoplon via mutation observers, in some browsers at least

piotrek13:12:37

On the other hand I am wondering if it is even needed with those material components if I would include them directly in DOM

alandipert13:12:12

Yeah- if you had one in a loop TPL, they'd only be created and reused

alandipert13:12:47

And presumably you'd have the content and attributes that matters cell driven

flyboarder23:12:47

@piotrek: I'll be updating material-hl to support material-components which are actually v2 of material design lite