ember-element-helper icon indicating copy to clipboard operation
ember-element-helper copied to clipboard

Element helper always render a div.

Open mbiondo opened this issue 4 years ago • 5 comments

My case:

This example does not work for me, it returns an exception

{{#let (element 'span') as |Tag|}}
  <Tag class="my-tag">hello world!</Tag>
{{/let}}
'The `element` helper polyfill encountered an unexpected error. ' +
'Please report the issue at http://github.com/tildeio/ember-element-helper ' +
'with the usage and conditions that caused this error.'

myComponent.hbs (glimmer)

{{#let (component (-element 'span')) as |Tag|}}
  <Tag >I Want to be a span</Tag>
{{/let}}

result:

<div id="ember-#" ...> 
    I Want to be a span
</div>

Should be

<span id="ember-#" ....>
    I Want to be a span
</span>

ember-cli 3.25.2

mbiondo avatar Apr 18 '21 19:04 mbiondo

I get the same error, both for rendering is (element) and your (-element) example. Running [email protected]

wynnerd avatar May 13 '21 11:05 wynnerd

Did you figure this out? What ember-source version are you using and are there anything notable about your app? This add-on is reasonably popular and there is CI testing all supported LTS versions as well as ember release/beta/canary, so it's probably something specific in your setup or interaction with other admins you are using.

chancancode avatar Jun 09 '21 04:06 chancancode

I just had to avoid this scenario of changing element tags completely and not use the addon. Using [email protected]. No idea how I would even go about diagnosing the other causes of this if it's not this. It is probably worth mentioning that everything else Octane works fine apart from this.

wynnerd avatar Jun 14 '21 07:06 wynnerd

Also seeing this:

Uncaught Error: Assertion Failed: The `element` helper polyfill encountered an unexpected error. Please report the issue at http://github.com/tildeio/ember-element-helper with the usage and conditions that caused this error.
    at assert (index.js:178:1)
    at element.js:14:1
    at index.js:3677:1
    at SimpleClassicHelperManager.getValue (index.js:3681:1)
    at manager.js:866:1
    at reference.js:161:1
    at track (validator.js:787:1)
    at valueForRef (reference.js:160:1)
    at Object.evaluate (runtime.js:2458:1)
    at AppendOpcodes.evaluate (runtime.js:1284:1)

amk221 avatar Jan 21 '22 10:01 amk221

Is this still happening? Over in ember-primitives, I'm effectively using dynamic element betweev div, and dialog elements

NullVoxPopuli avatar Aug 21 '23 15:08 NullVoxPopuli