push-subscription.js (731B)
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/. */ 4 "use strict"; 5 6 const { 7 pushSubscriptionSpec, 8 } = require("resource://devtools/shared/specs/worker/push-subscription.js"); 9 const { 10 FrontClassWithSpec, 11 registerFront, 12 } = require("resource://devtools/shared/protocol.js"); 13 14 class PushSubscriptionFront extends FrontClassWithSpec(pushSubscriptionSpec) { 15 get endpoint() { 16 return this._form.endpoint; 17 } 18 19 get quota() { 20 return this._form.quota; 21 } 22 23 form(form) { 24 this.actorID = form.actor; 25 this._form = form; 26 } 27 } 28 29 registerFront(PushSubscriptionFront);