1 /* vim: set ts=2 sw=2 sts=2 et tw=80: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 export class ContentSearchChild extends JSWindowActorChild {
8 // The event gets translated into a message that
9 // is then sent to the parent.
10 if (event.type == "ContentSearchClient") {
11 this.sendAsyncMessage(event.detail.type, event.detail.data);
16 // The message gets translated into an event that
17 // is then sent to the content.
18 this._fireEvent(msg.name, msg.data);
21 _fireEvent(type, data = null) {
22 let event = Cu.cloneInto(
31 this.contentWindow.dispatchEvent(
32 new this.contentWindow.CustomEvent("ContentSearchService", event)