Files
Alexandre Poirot 44e5012d2c Bug 1813648 - [devtools] Remove ActorClassWithSpec and all its dependencies. r=devtools-reviewers,jdescottes
Some actors weren't using any specification. They now have to pass a bare minimal spec object.
Unifying them to the regular Actor interface helps merging constructor with initialize
and instantiate all the actors without any code branch.

Differential Revision: https://phabricator.services.mozilla.com/D169359
2023-02-14 10:34:19 +00:00

28 lines
569 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const { Actor } = require("resource://devtools/shared/protocol/Actor.js");
class TestActor1 extends Actor {
constructor(conn, tab) {
super(conn, { typeName: "testOne", methods: [] });
this.tab = tab;
this.requestTypes = {
ping: TestActor1.prototype.onPing,
};
}
grip() {
return { actor: this.actorID, test: "TestActor1" };
}
onPing() {
return { pong: "pong" };
}
}
exports.TestActor1 = TestActor1;