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

Passthrough HTML attributes #588

Closed

Conversation

bobisjan
Copy link
Contributor

@bobisjan bobisjan commented Oct 25, 2020

@ef4
Copy link
Contributor

ef4 commented Feb 24, 2021

I never reviewed this because it has been marked Draft. But this is a real issue worth fixing.

I think maybe only this part is needed?

https://github.com/embroider-build/embroider/pull/588/files#diff-f6871a419b7638a206e71923afc7910d1a3252cdfa5c563a5fb7e455063146b0R74-R76

@bobisjan
Copy link
Contributor Author

bobisjan commented Mar 4, 2021

TBH I don't recall why the rest was added 🙈, but will look during weekend.

@bobisjan
Copy link
Contributor Author

bobisjan commented Mar 6, 2021

Not sure where attributes get lost, but something is needed (don't mean that the proposed solution is correct).

When I omit copying of attributes in PreparedEmberHTML, then HTMLEntrypoint receives index.html without the attributes, hence copying in Placeholder does nothing (both for scripts and styles).

@bobisjan
Copy link
Contributor Author

bobisjan commented Oct 27, 2021

I'm posting difference between source index.html and the one logged using this.dom.serialize() after https://github.com/embroider-build/embroider/blob/master/packages/core/src/html-entrypoint.ts#L23. The defers are lost for vendor and app, not for extra polyfills. Hence it looks that just https://github.com/embroider-build/embroider/pull/588/files#diff-f6871a419b7638a206e71923afc7910d1a3252cdfa5c563a5fb7e455063146b0R74-R76 is not enough? 🤔

app/index.html

<script src="{{rootURL}}assets/polyfill-shared.js" defer></script>
<script src="{{rootURL}}assets/polyfill-legacy.js" defer nomodule></script>
<script src="{{rootURL}}assets/polyfill-evergreen.js" defer></script>

<script src="{{rootURL}}assets/vendor.js" defer></script>
<script src="{{rootURL}}assets/zonky-app.js" defer></script>

HTMLEntrypoint

<script src="/assets/polyfill-shared.js" defer="" data-fastboot-ignore=""></script>
<script src="/assets/polyfill-legacy.js" defer="" nomodule="" data-fastboot-ignore=""></script>
<script src="/assets/polyfill-evergreen.js" defer="" data-fastboot-ignore=""></script>

    
<script src="/assets/vendor.js"></script>
<fastboot-script src="/ember-fetch/fetch-fastboot.js"></fastboot-script>
<fastboot-script src="/assets/embroider_macros_fastboot_init.js"></fastboot-script>
    
<script src="/assets/zonky-app.js" type="module"></script>
<fastboot-script src="/ember-cli-fastboot/app-factory.js"></fastboot-script>

@lifeart
Copy link
Collaborator

lifeart commented Jan 11, 2022

Hi @bobisjan! Have a good new year! Do you have time to push it forward? I think only tests is missing here

@bobisjan
Copy link
Contributor Author

Hi @bobisjan! Have a good new year! Do you have time to push it forward? I think only tests is missing here

Hi @lifeart 👋, I’ll give a try during this weekend 🤞

@bobisjan bobisjan force-pushed the passthrough-html-attributes branch 2 times, most recently from e50e940 to e79b7eb Compare January 22, 2022 18:11
@mansona
Copy link
Member

mansona commented Jan 10, 2024

It looks like this was covered by #1605 🎉

thanks again for your contribution

@mansona mansona closed this Jan 10, 2024
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

Successfully merging this pull request may close these issues.

Should Embroider passthrough script attributes?
4 participants