summaryrefslogtreecommitdiffstats
path: root/devtools/client/fronts/reflow.js
blob: 027e09e9a040a469365ed53d4c94cd11a78f84e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

"use strict";

const { reflowSpec } = require("resource://devtools/shared/specs/reflow.js");
const {
  FrontClassWithSpec,
  registerFront,
} = require("resource://devtools/shared/protocol.js");

/**
 * Usage example of the reflow front:
 *
 * let front = await target.getFront("reflow");
 * front.on("reflows", this._onReflows);
 * front.start();
 * // now wait for events to come
 */
class ReflowFront extends FrontClassWithSpec(reflowSpec) {
  constructor(client, targetFront, parentFront) {
    super(client, targetFront, parentFront);

    // Attribute name from which to retrieve the actorID out of the target actor's form
    this.formAttributeName = "reflowActor";
  }
}

exports.ReflowFront = ReflowFront;
registerFront(ReflowFront);