layout.js 801 B

12345678910111213141516171819202122232425262728293031
  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. const { FrontClassWithSpec } = require("devtools/shared/protocol");
  6. const { gridSpec, layoutSpec } = require("devtools/shared/specs/layout");
  7. const GridFront = FrontClassWithSpec(gridSpec, {
  8. form: function (form, detail) {
  9. if (detail === "actorid") {
  10. this.actorID = form;
  11. return;
  12. }
  13. this._form = form;
  14. },
  15. /**
  16. * Getter for the grid fragments data.
  17. */
  18. get gridFragments() {
  19. return this._form.gridFragments;
  20. }
  21. });
  22. const LayoutFront = FrontClassWithSpec(layoutSpec, {});
  23. exports.GridFront = GridFront;
  24. exports.LayoutFront = LayoutFront;