当前位置: 首页 > 文档资料 > tinyMCE 帮助文档 >

tinymce-dom-EventUtils

优质
小牛编辑
125浏览
2023-12-01

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.