Board Thread:Support Requests - Getting Technical/@comment-4368470-20190905085751/@comment-24692230-20190907033826

Emitewiki2 wrote: Sophiedp wrote: is fired when the page loads (and when you preview your edit and other things happen too if I remember correctly), so your function is running when the page and etc load, logging your string to the console. The use of  is for scripts, so you can have events where things happen (eg, your script is done loading) and other code or other user's code can listen for those events and run their code when the event happens. (see w:c:dev:MediaWiki:FastDelete/code.js for an example of ) Okay, so I guess the part I don't understand is what is the difference between  and , then? What would be different in w:c:dev:MediaWiki:FastDelete/code.js if on line 62 (the first occurence of ) they used   instead? It still would have  preceding it. The script fires the hook that other JS can wait for (using add), the  part just is what hook you're using.