瀏覽代碼

Docs: Remove context option from DomEmitterMixin methods.

Maciej Gołaszewski 8 年之前
父節點
當前提交
a46d66bcf4
共有 1 個文件被更改,包括 2 次插入6 次删除
  1. 2 6
      packages/ckeditor5-utils/src/dom/emittermixin.js

+ 2 - 6
packages/ckeditor5-utils/src/dom/emittermixin.js

@@ -46,7 +46,6 @@ const DomEmitterMixin = extend( {}, EmitterMixin, {
 	 * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher
 	 * the priority value the sooner the callback will be fired. Events having the same priority are called in the
 	 * order they were added.
-	 * @param {Object} [options.context] The object that represents `this` in the callback. Defaults to the object firing the event.
 	 * @param {Boolean} [options.useCapture=false] Indicates that events of this type will be dispatched to the registered
 	 * listener before being dispatched to any EventTarget beneath it in the DOM tree.
 	 *
@@ -179,7 +178,6 @@ extend( ProxyEmitter.prototype, EmitterMixin, {
 	 * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher
 	 * the priority value the sooner the callback will be fired. Events having the same priority are called in the
 	 * order they were added.
-	 * @param {Object} [options.context] The object that represents `this` in the callback. Defaults to the object firing the event.
 	 * @param {Boolean} [options.useCapture=false] Indicates that events of this type will be dispatched to the registered
 	 * listener before being dispatched to any EventTarget beneath it in the DOM tree.
 	 *
@@ -214,14 +212,12 @@ extend( ProxyEmitter.prototype, EmitterMixin, {
 	 *
 	 * @param {String} event The name of the event.
 	 * @param {Function} callback The function to stop being called.
-	 * @param {Object} [context] The context object to be removed, pared with the given callback. To handle cases where
-	 * the same callback is used several times with different contexts.
 	 *
 	 * @method module:utils/dom/emittermixin~ProxyEmitter#off
 	 */
-	off( event, callback, context ) {
+	off( event, callback ) {
 		// Execute parent class method first.
-		EmitterMixin.off.call( this, event, callback, context );
+		EmitterMixin.off.call( this, event, callback );
 
 		let events;