ember-wormhole: Can't find DOM in engine

I’m getting an error when using ember-wormhole inside an ember-engine:

Uncaught Error: ember-wormhole could not get DOM

Looks like the getDOM util doesn’t find ‘service:-document’ and the container lookup of ‘renderer:-dom’ results in an ‘InteractiveRenderer’ object that doesn’t have a ‘_dom’ property so it throws an error.

I’m not sure if this issue can be solved on the ember-wormhole side or if we need ember-engines to provide a reference to the DOM, but figured I’d leave this here for now.

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

I’m using Ember 2.12.0, Ember-CLI 2.12.0-beta.1, ember-power-select 1.5.0 and ember-engines 0.5.0-beta.9 and I still need @dbashford’s workaround

The same for me, with Ember 2.12.1 and ember-engines 0.5.0. The workaround worked here as well.

This affects ember-power-select

So, as mentioned above, it is erroring because the -document service cannot be found.

For giggles, I tossed that in as a dependency for the engine and it worked.

engines: {
  foo: {
    dependencies: {
      services: [
        '-document',
      ]
    }
  }
}

I’m inexperienced with some of the internals of all this, both with that particular service and with engines, so I feel like there may be some pitfalls to doing it this way?

@jbailey4 if you’re on ^ Ember 2.10, you can use {{#-in-element aDomElement}} things you want appended to 'aDomElement' {{/-in-element}}. Totally private, shouldn’t be used… but hey! it works!