Rominou34 / papillon

A beautiful CSS framework

Home Page:http://rominou34.github.io/papillon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

window.onload is overridden by custom js

Rominou34 opened this issue · comments

For example, if I create a custom.js file that I put on my website with a "window.onload = function()" in it, it will override the one in "dom.js", so event listener won't work

All the stuff done by Papillon which is currently in window.onload will be moved to Papillon.init()

So in their window.onload, devs just have to call p = new Papillon() and it will automatically run

http://stackoverflow.com/questions/3526916/javascript-class-call-method-when-object-initialized