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

js handler improvements #182

Closed
wants to merge 1 commit into from
Closed

js handler improvements #182

wants to merge 1 commit into from

Conversation

timomayer
Copy link
Member

No description provided.

@timomayer timomayer requested a review from ctmm June 3, 2020 22:23
@@ -7,7 +7,8 @@ const onJsLoaded = (options: HandleOptions): void => {
const script: HTMLScriptElement = document.createElement('script');
script.src = options.resource.path;
script.async = true;
document.body.append(script);
script.charset = 'utf-8';
document.head.append(script);
Copy link
Collaborator

@ctmm ctmm Jun 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given scripts are lazy loaded, does it make a difference if we append them to the body or the head?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no not from a technical perspective its just my opinion that the body should be as clean as possible and contain whenever possible only markup no scripts or styles

@ctmm
Copy link
Collaborator

ctmm commented Jun 17, 2020

@timomayer
I have introduced these same changes on
#184

Hope you don't mind closing this pull request.
I'd rather avoid investing time in fixing conflicts once the time to merge comes.

@ctmm ctmm closed this Jun 17, 2020
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.

None yet

2 participants