source.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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, RetVal, generateActorSpec} = require("devtools/shared/protocol");
  6. const sourceSpec = generateActorSpec({
  7. typeName: "source",
  8. methods: {
  9. getExecutableLines: { response: { lines: RetVal("json") } },
  10. onSource: {
  11. request: { type: "source" },
  12. response: RetVal("json")
  13. },
  14. prettyPrint: {
  15. request: { indent: Arg(0, "number") },
  16. response: RetVal("json")
  17. },
  18. disablePrettyPrint: {
  19. response: RetVal("json")
  20. },
  21. blackbox: { response: { pausedInSource: RetVal("boolean") } },
  22. unblackbox: {},
  23. setBreakpoint: {
  24. request: {
  25. location: {
  26. line: Arg(0, "number"),
  27. column: Arg(1, "nullable:number")
  28. },
  29. condition: Arg(2, "nullable:string"),
  30. noSliding: Arg(3, "nullable:boolean")
  31. },
  32. response: RetVal("json")
  33. },
  34. },
  35. });
  36. exports.sourceSpec = sourceSpec;