- I've used that before in my code. I don't see why you couldn't use it(I have also seenfind it beis often used in other libraries) as an "initializer" that sets up the code and DOM for the library rather than forcing the user of the library to have to call an initialization function.
- It depends. If you need to interact with the DOM right away(as in, find elements, change properties, or set element events), the code has to be at the bottom of the body. If it's just function declarations and definitions, you can keep your code in the head
- Is this a question?
- There is nothing that really pops out. You have very nice spacing in your code(everything isn't bunched together) and your formatting is perfect(in my opinion).