From 502272a1bcc15914075d4c7e4023913bf0679b3f Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Fri, 10 Apr 2015 16:07:04 +0100 Subject: [PATCH] mw.ViewPageTarget: Use new simplified ve.ui.Surface#getDom Depends on I6355cf484b8 in core. Change-Id: I3dcce40af346b1c5ab75c0da81aee8ae02937f44 --- modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 078d506843..2c56f8fb28 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -1256,7 +1256,7 @@ ve.init.mw.ViewPageTarget.prototype.showSaveDialog = function () { // Preload the serialization if ( !target.docToSave ) { - target.docToSave = ve.dm.converter.getDomFromModel( target.getSurface().getModel().getDocument() ); + target.docToSave = target.getSurface().getDom(); } target.prepareCacheKey( target.docToSave ); @@ -1734,7 +1734,7 @@ ve.init.mw.ViewPageTarget.prototype.switchToWikitextEditor = function ( discardC } ).toString(); } else { this.serialize( - this.docToSave || ve.dm.converter.getDomFromModel( this.getSurface().getModel().getDocument() ), + this.docToSave || this.getSurface().getDom(), function ( wikitext ) { ve.track( 'mwedit.abort', { type: 'switchwith', mechanism: 'navigate' } ); target.submitWithSaveFields( { wpDiff: 1, veswitched: 1 }, wikitext );