Bug 1467571 [wpt PR 11385] - Make manifest's parsers quicker, a=testonly
[gecko.git] / devtools / shared / fronts / reflow.js
blob9b449f4fa15904f4474ae7c949bee36003849243
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 "use strict";
7 const {reflowSpec} = require("devtools/shared/specs/reflow");
8 const protocol = require("devtools/shared/protocol");
10 /**
11  * Usage example of the reflow front:
12  *
13  * let front = ReflowFront(toolbox.target.client, toolbox.target.form);
14  * front.on("reflows", this._onReflows);
15  * front.start();
16  * // now wait for events to come
17  */
18 const ReflowFront = protocol.FrontClassWithSpec(reflowSpec, {
19   initialize: function(client, {reflowActor}) {
20     protocol.Front.prototype.initialize.call(this, client, {actor: reflowActor});
21     this.manage(this);
22   },
24   destroy: function() {
25     protocol.Front.prototype.destroy.call(this);
26   },
27 });
29 exports.ReflowFront = ReflowFront;