preload.go 1.2 KB

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