inspector.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Package inspector provides the Chrome DevTools Protocol
  2. // commands, types, and events for the Inspector domain.
  3. //
  4. // Generated by the cdproto-gen command.
  5. package inspector
  6. // Code generated by cdproto-gen. DO NOT EDIT.
  7. import (
  8. "context"
  9. "github.com/chromedp/cdproto/cdp"
  10. )
  11. // DisableParams disables inspector domain notifications.
  12. type DisableParams struct{}
  13. // Disable disables inspector domain notifications.
  14. //
  15. // See: https://chromedevtools.github.io/devtools-protocol/tot/Inspector#method-disable
  16. func Disable() *DisableParams {
  17. return &DisableParams{}
  18. }
  19. // Do executes Inspector.disable against the provided context.
  20. func (p *DisableParams) Do(ctx context.Context) (err error) {
  21. return cdp.Execute(ctx, CommandDisable, nil, nil)
  22. }
  23. // EnableParams enables inspector domain notifications.
  24. type EnableParams struct{}
  25. // Enable enables inspector domain notifications.
  26. //
  27. // See: https://chromedevtools.github.io/devtools-protocol/tot/Inspector#method-enable
  28. func Enable() *EnableParams {
  29. return &EnableParams{}
  30. }
  31. // Do executes Inspector.enable against the provided context.
  32. func (p *EnableParams) Do(ctx context.Context) (err error) {
  33. return cdp.Execute(ctx, CommandEnable, nil, nil)
  34. }
  35. // Command names.
  36. const (
  37. CommandDisable = "Inspector.disable"
  38. CommandEnable = "Inspector.enable"
  39. )