What is dojo/domReady plugin? which are methods comes under dojo/domReady?
require(["dojo/_base/fx", "dojo/fx", "dojo/on",
"dojo/dom", "dojo/domReady!"], function(baseFx, fx, on, dom) {
When you add "dojo/domReady!" to your require() module block, you are instructing Dojo to wait on the callback that you pass until after the DOM has finished loading. So you know that when the DOMContentLoaded
event fires, all of the HTML is finished.
There is a subtle different between "dojo/ready"
and "dojo/domReady!"
in that, "dojo/ready" allows you to pass it a function callback that will only be called after all other require calls have been loaded. This is extremely useful for modules dependant on other modules having being loaded.
Also the "!" in the dojo/domReady
just tells you that it is a custom plugin, and isn't a specific plugin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With