mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Document the fact that ve.dm.MetaItem#replaceWith takes a plain object"
This commit is contained in:
commit
8fc7c8d336
|
@ -62,7 +62,9 @@ ve.dm.MetaItem.prototype.remove = function () {
|
|||
/**
|
||||
* Replace item with another in-place.
|
||||
*
|
||||
* @param {ve.dm.MetaItem} item Item to replace this item with
|
||||
* Pass a plain object rather than a MetaItem into this function unless you know what you're doing.
|
||||
*
|
||||
* @param {Object|ve.dm.MetaItem} item Item to replace this item with
|
||||
*/
|
||||
ve.dm.MetaItem.prototype.replaceWith = function ( item ) {
|
||||
var offset = this.getOffset(),
|
||||
|
|
|
@ -334,6 +334,8 @@ ve.dm.MetaList.prototype.getAllItems = function () {
|
|||
/**
|
||||
* Insert new metadata into the document. This builds and processes a transaction that inserts
|
||||
* metadata into the document.
|
||||
*
|
||||
* Pass a plain object rather than a MetaItem into this function unless you know what you're doing.
|
||||
* @param {Object|ve.dm.MetaItem} meta Metadata element (or MetaItem) to insert
|
||||
* @param {Number} [offset] Offset to insert the new metadata, or undefined to add to the end
|
||||
* @param {Number} [index] Index to insert the new metadata, or undefined to add to the end
|
||||
|
|
Loading…
Reference in a new issue