Closed pavloo closed 8 years ago
Generally speaking we seek to avoid inferring application state from DOM. Could you provide more details? I'm curious as to why you couldn't extend from ember-wormhole
and add additional logic in didInsertElement
.
I imagine something along these lines would work:
import EmberWormhole from 'ember-wormhole/components/ember-wormhole';
export default EmberWormhole.extend({
didInsertElement() {
this._super(...arguments);
// Send your context notification here
}
});
@chrislopresto yeah, it will work out. I over-engineered this thing. The issue can be closed. Thanks.
:+1:
I have a use case, when I need to have some way of notifying context when wormhole is mounted into destination, eg
So when wormhole's content is inserted into
{{destination
, actionwormholeMounted
is fired. I already implemented this using MutationObserver in my app. Do you think it might be useful having this feature as a part of this addon? If yes, I will issue a PR. Thanks.