From 78211f96953bc1a63570f2430cee4ad92c841ce4 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Tue, 6 May 2025 23:09:23 +0200 Subject: vault backup: 2025-05-06 23:09:23 --- Script elements.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Script elements.md (limited to 'Script elements.md') diff --git a/Script elements.md b/Script elements.md new file mode 100644 index 0000000..e220be5 --- /dev/null +++ b/Script elements.md @@ -0,0 +1,15 @@ +--- +tags: + - html + - web +--- +Default type: javascript. Can specify `type` with a mimetype of alternate script language. `type="module"` for javascript modules. + +Place scripts at the end rather than at the start, unless [DOMContentLoadedEvent](https://developer.mozilla.org/docs/Web/API/Document/DOMContentLoaded_event) is used. +- Javascript can't reference elements that don't yet exist +- Browser blocks rendering, and halts downloads etc until js finishes execution + +`