func (d *domainClient) StopWorker(ctx context.Context, args *StopWorkerArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "ServiceWorker.stopWorker", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "ServiceWorker.stopWorker", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "StopWorker", Err: err}
	}
	return
}
StopWorker invokes the ServiceWorker method.
package serviceworker
import (
	"context"
	"github.com/mafredri/cdp/protocol/internal"
	"github.com/mafredri/cdp/rpcc"
)
type domainClient struct{ conn *rpcc.Conn }
func NewClient(conn *rpcc.Conn) *domainClient {
	return &domainClient{conn: conn}
}
func (d *domainClient) DeliverPushMessage(ctx context.Context, args *DeliverPushMessageArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "ServiceWorker.deliverPushMessage", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "ServiceWorker.deliverPushMessage", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "DeliverPushMessage", Err: err}
	}
	return
}
func (d *domainClient) Disable(ctx context.Context) (err error) {
	err = rpcc.Invoke(ctx, "ServiceWorker.disable", nil, nil, d.conn)
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "Disable", Err: err}
	}
	return
}
func (d *domainClient) DispatchSyncEvent(ctx context.Context, args *DispatchSyncEventArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "ServiceWorker.dispatchSyncEvent", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "ServiceWorker.dispatchSyncEvent", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "DispatchSyncEvent", Err: err}
	}
	return
}
func (d *domainClient) Enable(ctx context.Context) (err error) {
	err = rpcc.Invoke(ctx, "ServiceWorker.enable", nil, nil, d.conn)
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "Enable", Err: err}
	}
	return
}
func (d *domainClient) InspectWorker(ctx context.Context, args *InspectWorkerArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "ServiceWorker.inspectWorker", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "ServiceWorker.inspectWorker", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "InspectWorker", Err: err}
	}
	return
}
func (d *domainClient) SetForceUpdateOnPageLoad(ctx context.Context, args *SetForceUpdateOnPageLoadArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "ServiceWorker.setForceUpdateOnPageLoad", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "ServiceWorker.setForceUpdateOnPageLoad", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "SetForceUpdateOnPageLoad", Err: err}
	}
	return
}
func (d *domainClient) SkipWaiting(ctx context.Context, args *SkipWaitingArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "ServiceWorker.skipWaiting", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "ServiceWorker.skipWaiting", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "SkipWaiting", Err: err}
	}
	return
}
func (d *domainClient) StartWorker(ctx context.Context, args *StartWorkerArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "ServiceWorker.startWorker", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "ServiceWorker.startWorker", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "StartWorker", Err: err}
	}
	return
}
func (d *domainClient) StopAllWorkers(ctx context.Context) (err error) {
	err = rpcc.Invoke(ctx, "ServiceWorker.stopAllWorkers", nil, nil, d.conn)
	if err != nil {
		err = &internal.OpError{Domain: "ServiceWorker", Op: "StopAllWorkers", Err: err}
	}
	return
}