Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listening to js/window :load breaks with :advanced optimizations #101

Open
jeaye opened this issue Feb 3, 2016 · 0 comments
Open

Listening to js/window :load breaks with :advanced optimizations #101

jeaye opened this issue Feb 3, 2016 · 0 comments

Comments

@jeaye
Copy link

jeaye commented Feb 3, 2016

(dommy/listen! js/window :load (fn [_] (println "meow")))

That works fine up to :simple optimizations, but breaks once you go higher. I've found that the issue also happens when selecting the body as well.

(dommy/listen! (sel1 :body) :load (fn [_] (println "meow")))

So far, I haven't found anything in dommy that works, with :advanced, for listening to onload. As a replacement, I've been using a more primitive approach.

(aset js/window "onload" (fn [_] (println "meow")))

Once this has been setup, all other dommy calls I'm making seem to work just fine. The indication here, I gather, is that the issue is with :load listening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant