Skip to content

Commit

Permalink
run on-document-load js partial through #babel helper (#789)
Browse files Browse the repository at this point in the history
The exit disclaimer code instructions tell people to put
their code in the on-document-load partial. We want this
partial to work in ie11 even if people use newer features.

J=SLAP-1131
TEST=manual

see that I can specify an arrow func in on-doc-load and it
gets transpiled
  • Loading branch information
oshi97 committed May 24, 2021
1 parent d9a59a4 commit dab722e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layouts/html.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@
href="{{#unless (isNonRelativeUrl global_config.favicon)}}{{relativePath}}/{{/unless}}{{global_config.favicon}}" />
{{/if}}
<script>
{{#babel}}
document.addEventListener('DOMContentLoaded', function () {
{{> script/on-document-load}}
});
{{/babel}}
</script>
<script src="{{relativePath}}/bundle.js" data-webpack-inline></script>
{{#if global_config.googleAnalyticsId}}
Expand Down

0 comments on commit dab722e

Please sign in to comment.