0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/frontend
Fabien egg O'Carroll 55d7176e51 🐛 Fixed card scripts executing before DOM is parsed
no-issue

Using the async attribute means that the script is downloaded in
parallel with the parsing of the html into DOM, and then executed upon
completion. This means that the script cannot be sure that particular
parts of the DOM exist as it may not have finished parsing. This has
resulted in bugs with the new toggle card not working.

Switching our script to use the defer attribute means that the script is
still downloaded in parallel with parsing, but it is not executed until
parsing is complete. This means that the script can safely access the
DOM.
2021-12-08 17:54:37 +02:00
..
apps Tweaked AMP and email CSS and moved from REM to EM 2021-12-06 13:08:02 +00:00
helpers 🐛 Fixed card scripts executing before DOM is parsed 2021-12-08 17:54:37 +02:00
meta Added fallbacks when the site title is undefined 2021-10-27 12:18:57 +02:00
public Moved public folder to frontend 2021-10-16 19:27:34 +01:00
services Revert "Extract logging from DI patterns, only use @tryghost/logging package" 2021-12-08 14:28:41 +00:00
src/cards Updated audio card frontend styles in Chrome 2021-12-08 12:22:39 +00:00
views
web Fixed MIME type for public/cards.min.js part deux 2021-12-02 09:03:06 +00:00