Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element helper always render a div. #45

Open
mbiondo opened this issue Apr 18, 2021 · 5 comments
Open

Element helper always render a div. #45

mbiondo opened this issue Apr 18, 2021 · 5 comments

Comments

@mbiondo
Copy link

mbiondo commented Apr 18, 2021

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

@wynnerd
Copy link

wynnerd commented May 13, 2021

I get the same error, both for rendering is (element) and your (-element) example. Running ember-cli@3.26.1

@chancancode
Copy link
Member

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.

@wynnerd
Copy link

wynnerd commented Jun 14, 2021

I just had to avoid this scenario of changing element tags completely and not use the addon. Using ember-source@3.26.1. 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.

@amk221
Copy link

amk221 commented Jan 21, 2022

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)

@NullVoxPopuli
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants