diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index 22489a372e..c521b2305c 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -96,6 +96,17 @@ OO.inheritClass( ve.init.mw.ArticleTarget, ve.init.mw.Target ); /** * @event save + * @param {string} html Rendered page HTML from server + * @param {string} categoriesHtml Rendered categories HTML from server + * @param {number} newid New revision id, undefined if unchanged + * @param {boolean} isRedirect Whether this page is a redirect or not + * @param {string} displayTitle What HTML to show as the page title + * @param {Object} lastModified Object containing user-formatted date + * and time strings, or undefined if we made no change. + * @param {string} contentSub HTML to show as the content subtitle + * @param {Array} modules The modules to be loaded on the page + * @param {Object} jsconfigvars The mw.config values needed on the page + * Fired immediately after a save is successfully completed */ /** @@ -680,7 +691,7 @@ ve.init.mw.ArticleTarget.prototype.saveComplete = function () { this.initialEditSummary = null; this.saveDeferred.resolve(); - this.emit( 'save' ); + this.emit.apply( this, [ 'save' ].concat( Array.prototype.slice.call( arguments ) ) ); }; /** diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js b/modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js index 197fdbe60d..4b4705a926 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTargetEvents.js @@ -106,9 +106,16 @@ ve.init.mw.ArticleTargetEvents.prototype.onSaveInitiated = function () { /** * Track when the save is complete * - * @param {string} content - * @param {string} categoriesHtml - * @param {number} newRevId + * @param {string} content Rendered page HTML from server + * @param {string} categoriesHtml Rendered categories HTML from server + * @param {number} newRevId New revision id, undefined if unchanged + * @param {boolean} isRedirect Whether this page is a redirect or not + * @param {string} displayTitle What HTML to show as the page title + * @param {Object} lastModified Object containing user-formatted date + * and time strings, or undefined if we made no change. + * @param {string} contentSub HTML to show as the content subtitle + * @param {Array} modules The modules to be loaded on the page + * @param {Object} jsconfigvars The mw.config values needed on the page */ ve.init.mw.ArticleTargetEvents.prototype.onSaveComplete = function ( content, categoriesHtml, newRevId ) { this.trackTiming( 'performance.user.saveComplete', { duration: ve.now() - this.timings.saveInitiated } );