reflow.js 838 B

12345678910111213141516171819202122232425262728293031323334
  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 {Arg, generateActorSpec} = require("devtools/shared/protocol");
  6. const reflowSpec = generateActorSpec({
  7. typeName: "reflow",
  8. events: {
  9. /**
  10. * The reflows event is emitted when reflows have been detected. The event
  11. * is sent with an array of reflows that occured. Each item has the
  12. * following properties:
  13. * - start {Number}
  14. * - end {Number}
  15. * - isInterruptible {Boolean}
  16. */
  17. reflows: {
  18. type: "reflows",
  19. reflows: Arg(0, "array:json")
  20. }
  21. },
  22. methods: {
  23. start: {oneway: true},
  24. stop: {oneway: true},
  25. },
  26. });
  27. exports.reflowSpec = reflowSpec;