返回介绍

tinymce-dom-EventUtils

发布于 2019-05-06 06:49:55 字数 2982 浏览 1201 评论 0 收藏 0

Methods

namesummarydefined by
bind()Binds a callback to an event on the specified target.tinymce.dom.EventUtils
clean()Removes all bound event listeners for the specified target. This will also remove any bound listeners to child nodes within that target.tinymce.dom.EventUtils
fire()Fires the specified event on the specified target.tinymce.dom.EventUtils
unbind()Unbinds the specified event by name, name and callback or all events on the target.tinymce.dom.EventUtils

Methods

bind

bind(target:Object, names:String, callback:function, scope:Object):function

Binds a callback to an event on the specified target.

Parameters
  • target (Object) - Target node/window or custom object.
  • names (String) - Name of the event to bind.
  • callback (function) - Callback function to execute when the event occurs.
  • scope (Object) - Scope to call the callback function on, defaults to target.
Return value
  • function - Callback function that got bound.

clean

clean(target:Object):EventUtils

Removes all bound event listeners for the specified target. This will also remove any bound listeners to child nodes within that target.

Parameters
  • target (Object) - Target node/window object.
Return value
  • EventUtils - Event utils instance.

fire

fire(target:Object, name:String, args:Object):EventUtils

Fires the specified event on the specified target.

Parameters
  • target (Object) - Target node/window or custom object.
  • name (String) - Event name to fire.
  • args (Object) - Optional arguments to send to the observers.
Return value
  • EventUtils - Event utils instance.

unbind

unbind(target:Object, names:String, callback:function):EventUtils

Unbinds the specified event by name, name and callback or all events on the target.

Parameters
  • target (Object) - Target node/window or custom object.
  • names (String) - Optional event name to unbind.
  • callback (function) - Optional callback function to unbind.
Return value
  • EventUtils - Event utils instance.

Can't find what you're looking for? Let us know.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文