Make it possible to load scripts once the document is loaded
Currently, the scripts are added to the head that of the document. We see two solutions to this:
- make add_js accept a "location" argument allowing to add the js at the end of the document. The "location" argument could default to "head" to not break the api en could accept a "foot" value;
- make add_js accept custom attributes, it would allow to pass defer, which make the script execute once the document has loaded