callback – the function to call when the “DOMContentLoaded” event occurs (required).
Returns:
A reference to the [[mdn>Web/XPath/Functions/document|document]] object, thus allowing for command chaining.
Note:
This is just a shorthand function for the [[toolbox:event:on:index|.on]] method, specific for the “DOMContentLoaded” event. See there for more information and examples.
===== See also =====
* [[toolbox:event:on:index|.on]]
* [[toolbox:event:off:index|.off]]
===== More information =====
* [[mdn>Web/API/HTMLFormElement|HTMLFormElement]] on MDN.
* [[mdn>Web/XPath/Functions/document|document]] on MDN.