ember-element-helper
ember-element-helper copied to clipboard
Element helper always render a div.
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
I get the same error, both for rendering is (element) and your (-element) example. Running [email protected]
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.
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.
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)
Is this still happening? Over in ember-primitives, I'm effectively using dynamic element betweev div, and dialog elements