Browse Source

Improved API docs.

Maciej Bukowski 6 years ago
parent
commit
a25cca1983
1 changed files with 8 additions and 6 deletions
  1. 8 6
      packages/ckeditor5-watchdog/src/contextwatchdog.js

+ 8 - 6
packages/ckeditor5-watchdog/src/contextwatchdog.js

@@ -19,10 +19,11 @@ import getSubNodes from './utils/getsubnodes';
  */
  */
 export default class ContextWatchdog extends Watchdog {
 export default class ContextWatchdog extends Watchdog {
 	/**
 	/**
-	 * @param {module:watchdog/watchdog~WatchdogConfig} [config] The watchdog plugin configuration.
+	 * @param {Object} [contextConfig] Context configuration.
+	 * @param {module:watchdog/watchdog~WatchdogConfig} [watchdogConfig] The watchdog plugin configuration.
 	 */
 	 */
-	constructor( config = {}, contextConfig = {} ) {
-		super( config );
+	constructor( contextConfig = {}, watchdogConfig = {} ) {
+		super( watchdogConfig );
 
 
 		/**
 		/**
 		 * @protected
 		 * @protected
@@ -267,10 +268,11 @@ export default class ContextWatchdog extends Watchdog {
 	/**
 	/**
 	 *
 	 *
 	 * @param {module:core/context~Context} Context
 	 * @param {module:core/context~Context} Context
-	 * @param {module:watchdog/watchdog~WatchdogConfig} watchdogConfig
+	 * @param {Object} [contextConfig]
+	 * @param {module:watchdog/watchdog~WatchdogConfig} [watchdogConfig]
 	 */
 	 */
-	static for( Context, watchdogConfig ) {
-		const watchdog = new this( watchdogConfig );
+	static for( Context, contextConfig, watchdogConfig ) {
+		const watchdog = new this( contextConfig, watchdogConfig );
 
 
 		watchdog.setCreator( config => Context.create( config ) );
 		watchdog.setCreator( config => Context.create( config ) );