|
|
@@ -133,6 +133,7 @@ export default class DataController {
|
|
|
this.upcastDispatcher.on( 'documentFragment', convertToModelFragment(), { priority: 'lowest' } );
|
|
|
|
|
|
this.decorate( 'init' );
|
|
|
+ this.decorate( 'set' );
|
|
|
|
|
|
// Fire `ready` event when initialisation has completed. Such low level listener gives possibility
|
|
|
// to plug into initialisation pipeline without interrupting the initialisation flow.
|
|
|
@@ -317,6 +318,7 @@ export default class DataController {
|
|
|
*
|
|
|
* dataController.set( { main: '<p>Foo</p>', title: '<h1>Bar</h1>' } ); // Sets data on the `main` and `title` roots.
|
|
|
*
|
|
|
+ * @fires set
|
|
|
* @param {String|Object.<String,String>} data Input data as a string or an object containing `rootName` - `data`
|
|
|
* pairs to set data on multiple roots at once.
|
|
|
*/
|
|
|
@@ -452,6 +454,15 @@ export default class DataController {
|
|
|
*
|
|
|
* @event init
|
|
|
*/
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Event fired after {@link #set set() method} has been run.
|
|
|
+ *
|
|
|
+ * The `set` event is fired by decorated {@link #set} method.
|
|
|
+ * See {@link module:utils/observablemixin~ObservableMixin#decorate} for more information and samples.
|
|
|
+ *
|
|
|
+ * @event set
|
|
|
+ */
|
|
|
}
|
|
|
|
|
|
mix( DataController, ObservableMixin );
|