mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 09:17:30 +08:00
2457553d0a
Safari has a bug which means that scripts with the `defer` attribute are executed before stylesheets have finished loading. This is being tracked at https://bugs.webkit.org/show_bug.cgi?id=209261. This commit works around the problem by introducing a no-op inline `<script>` to the end of our HTML document. This works because defer scripts are guaranteed to run after inline scripts, and inline scripts are guaranteed to run after any preceding stylesheets. Technically we only need this for Safari. But given that the cost is so low, it makes sense to include it everywhere rather than incurring the complexity of gating it by user-agent. |
||
---|---|---|
.. | ||
application_helper.rb | ||
common_helper.rb | ||
defer_script_helper.rb | ||
email_helper.rb | ||
embed_helper.rb | ||
emoji_helper.rb | ||
list_helper.rb | ||
posts_helper.rb | ||
qunit_helper.rb | ||
splash_screen_helper.rb | ||
topic_post_bookmarkable_helper.rb | ||
topics_helper.rb | ||
user_notifications_helper.rb |