我有这段代码来显示通知:
(new js/Notification "call me" (clj->js {
:onclick (js* "new MozActivity({name:'dial',number:'12345678'})")
:sticky "true"
:silent "true"
:body (v "number")
:icon "app://communications.gaiamobile.org/dialer/style/icons/dialer_84.png"}))
问题是 onclick 功能,没有它,它会正确显示通知。但如果我按照说明离开它会显示拨号屏幕(?!?!?!?!)
我也试过
:onclick (js/MozActivity. (clj->js {:name "dial" :data {:number "12345678"}}))
并且行为方式相同
将函数传递给Notification的onclick属性的正确方法是什么? `
答案 0 :(得分:0)
:onclick #(js/MozActivity. #js {:name "dial" :number "12345678"})