Notes: Intro (All the cool stuff you can build)
M1 (should m1 be blinking light alone?) Then we reinforce it with each module…
/** | |
* Stringifies a function, and wraps it in an IIFE so it'll auto execute. | |
* @remarks The assumption is that you'll be inlining this function into a vanilla \<script\> tag on the page. | |
* Therefore you should follow these rules: | |
* Standalone code. No imports / or deps on other files / methods. | |
* You can use TS, but carefully watch how the output is compiled down to ensure it works for the lowest browser target. | |
* Ensure safety. Anything that can fail should likely be wrapped in a try/catch. | |
* This will likely be used as blocking js. Keep it short! | |
* @param parameter1 - Allows passing a 1/2 string|number param to the function to be inlined. | |
* @param parameter2 - Allows passing a 2/2 string|number param to the function to be inlined. |