-/*global OO*/
( function ( mw, $ ) {
/**
* This is an implementation of MessagePoster for wikitext talk pages.
*
* @constructor
* @param {mw.Title} title Wikitext page in a talk namespace, to post to
+ * @param {mw.Api} api mw.Api object to use
*/
- function WikitextMessagePoster( title ) {
- this.api = new mw.Api();
+ function WikitextMessagePoster( title, api ) {
+ this.api = api;
this.title = title;
}