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

Queue pending when-dom event handlers #156

Merged
merged 2 commits into from Nov 12, 2016
Merged

Conversation

micha
Copy link
Contributor

@micha micha commented Nov 6, 2016

No description provided.

@thedavidmeister
Copy link
Contributor

@micha looks good, can we add the test that we discussed last night?

@thedavidmeister
Copy link
Contributor

thedavidmeister commented Nov 7, 2016

we should expect something like this to pass now:

(deftest bind-events
 (let [c (j/cell nil)
       f #(reset! c true)
       i (h/div :click f)]
   (-> js/document .-body (.appendChild i))
   (when-dom i
    ; Native event.
    (is (nil? @c))
    (.dispatchEvent i (js/Event. "click"))
    (is (= true @c)))))

@micha
Copy link
Contributor Author

micha commented Nov 7, 2016

ah right, I'll add the test to this pr
On Nov 6, 2016 19:50, "David Meister" notifications@github.com wrote:

we should expect something like this to pass now:

(deftest bind-events
(let [c (j/cell nil)
f #(reset! c true)
i (h/div :click f)](-> js/document .-body %28.appendChild i%29)
(with-dom i
; Native event.
(is (nil? @c))
(.dispatchEvent i (js/Event. "click"))
(is (= true @c)))))


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#156 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAA-PsJGbtOqVyQAWEJgpxEN4oCoc9bNks5q7nXUgaJpZM4KqnKK
.

@thedavidmeister
Copy link
Contributor

@micha i just disabled circle from watching hoplon FYI, as I wasn't exactly sure where that part of the other PR stood.

Ping me if you want to discuss that :)

@micha micha merged commit 73e55ca into hoplon:master Nov 12, 2016
@micha micha deleted the when-dom-events branch November 12, 2016 16:19
@micha micha removed the in progress label Nov 12, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants