Source code
Revision control
Copy as Markdown
Other Tools
/* Any copyright is dedicated to the Public Domain.
"use strict";
var {
RetVal,
Actor,
FrontClassWithSpec,
generateActorSpec,
} = require("resource://devtools/shared/protocol.js");
const lazySpec = generateActorSpec({
typeName: "lazy",
methods: {
hello: {
response: { str: RetVal("string") },
},
},
});
class LazyActor extends Actor {
constructor(conn) {
super(conn, lazySpec);
Services.obs.notifyObservers(null, "actor", "instantiated");
}
hello() {
return "world";
}
}
exports.LazyActor = LazyActor;
Services.obs.notifyObservers(null, "actor", "loaded");
class LazyFront extends FrontClassWithSpec(lazySpec) {
constructor(client) {
super(client);
}
}
exports.LazyFront = LazyFront;