clux/modul8 — Issue #13: domloader explanation
Author: panosru
Created: 2012-01-24 06:16:31+00:00
State: open

Hi, could you explain me a bit more the domloader setting? I'm not sure if I get it from what I read from docs so far.

For instance I understood that if I don't set `domloader` then the output code that produced by compiler will executed by the time it will loaded to the browser, but if I set `domloader` to use a method like `$(document).ready` so we will end up with this: `.set('domloader', '$(document).ready')` then the output code will be wrapped in order to be executed when our `domloader` function is triggered, so when `$(document).ready` is invoked then our compiled code will be executed.

I can't get the value of this, if you could provide me with couple of use cases I would greatly appreciate it.

Also to mention that what if we want part of our code to be immediately executed when file is loaded and other part of my script to be triggered on different events, some on window load others on document load etc, then would be considered as best practice to leave the `domloader` setting unset and instead call those *event* methods inside our code as we would do normally in any other case?

Thank you for your time :)