Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gun('something').on()リストの更新またはリストへの変更を停止するように、ハンドラー (登録解除) の gundbによってトリガーされるイベントを停止するにはどうすればよいですか。
gun('something').on()
0.5 以降では、単純に を呼び出します.off()。
.off()
ただし、以前のバージョンではできません。回避策はありますが、その方法は次のとおりです。
var options = {}; gun.get('something').on(callback, options); options.on.off()
基本的に、イベント エミッターはオプション オブジェクトにonプロパティとしてアタッチされ、後で呼び出すことができます.off()。これが役立つことを願っています!
on