_id stringlengths 2 7 | title stringlengths 1 118 | partition stringclasses 3 values | text stringlengths 52 85.5k | language stringclasses 1 value | meta_information dict |
|---|---|---|---|---|---|
q19100 | Invoke | train | func Invoke(ctx context.Context, method string, args, reply interface{}, conn *Conn) error {
if ctx == nil {
ctx = context.Background()
}
call := &rpcCall{
Method: method,
Args: args,
Reply: reply,
Error: make(chan error, 1), // Do not block.
}
err := conn.send(ctx, call)
if err != nil {
return err
}
select {
case <-ctx.Done():
return ctx.Err()
case err = <-call.Error:
return err
}
} | go | {
"resource": ""
} |
q19101 | store | train | func (b *messageBuffer) store(m *message) {
b.mu.Lock()
defer b.mu.Unlock()
if len(b.backlog) == 0 {
select {
case b.c <- m:
return
default:
}
}
b.backlog = append(b.backlog, m)
} | go | {
"resource": ""
} |
q19102 | load | train | func (b *messageBuffer) load() {
b.mu.Lock()
defer b.mu.Unlock()
if len(b.backlog) > 0 {
select {
case b.c <- b.backlog[0]:
b.backlog[0] = nil // Remove reference from underlying array.
b.backlog = b.backlog[1:]
default:
}
}
} | go | {
"resource": ""
} |
q19103 | clear | train | func (b *messageBuffer) clear() {
b.mu.Lock()
backlog := b.backlog
b.backlog = nil
b.mu.Unlock()
select {
case m := <-b.c:
m.next()
default:
}
for _, m := range backlog {
m.next()
}
} | go | {
"resource": ""
} |
q19104 | NewStream | train | func NewStream(ctx context.Context, method string, conn *Conn) (Stream, error) {
if ctx == nil {
ctx = context.Background()
}
return newStreamClient(ctx, method, conn)
} | go | {
"resource": ""
} |
q19105 | GetPartialAXTree | train | func (d *domainClient) GetPartialAXTree(ctx context.Context, args *GetPartialAXTreeArgs) (reply *GetPartialAXTreeReply, err error) {
reply = new(GetPartialAXTreeReply)
if args != nil {
err = rpcc.Invoke(ctx, "Accessibility.getPartialAXTree", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Accessibility.getPartialAXTree", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Accessibility", Op: "GetPartialAXTree", Err: err}
}
return
} | go | {
"resource": ""
} |
q19106 | AddRule | train | func (d *domainClient) AddRule(ctx context.Context, args *AddRuleArgs) (reply *AddRuleReply, err error) {
reply = new(AddRuleReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.addRule", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.addRule", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "AddRule", Err: err}
}
return
} | go | {
"resource": ""
} |
q19107 | CollectClassNames | train | func (d *domainClient) CollectClassNames(ctx context.Context, args *CollectClassNamesArgs) (reply *CollectClassNamesReply, err error) {
reply = new(CollectClassNamesReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.collectClassNames", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.collectClassNames", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "CollectClassNames", Err: err}
}
return
} | go | {
"resource": ""
} |
q19108 | CreateStyleSheet | train | func (d *domainClient) CreateStyleSheet(ctx context.Context, args *CreateStyleSheetArgs) (reply *CreateStyleSheetReply, err error) {
reply = new(CreateStyleSheetReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.createStyleSheet", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.createStyleSheet", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "CreateStyleSheet", Err: err}
}
return
} | go | {
"resource": ""
} |
q19109 | GetBackgroundColors | train | func (d *domainClient) GetBackgroundColors(ctx context.Context, args *GetBackgroundColorsArgs) (reply *GetBackgroundColorsReply, err error) {
reply = new(GetBackgroundColorsReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.getBackgroundColors", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.getBackgroundColors", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "GetBackgroundColors", Err: err}
}
return
} | go | {
"resource": ""
} |
q19110 | GetComputedStyleForNode | train | func (d *domainClient) GetComputedStyleForNode(ctx context.Context, args *GetComputedStyleForNodeArgs) (reply *GetComputedStyleForNodeReply, err error) {
reply = new(GetComputedStyleForNodeReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.getComputedStyleForNode", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.getComputedStyleForNode", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "GetComputedStyleForNode", Err: err}
}
return
} | go | {
"resource": ""
} |
q19111 | GetMatchedStylesForNode | train | func (d *domainClient) GetMatchedStylesForNode(ctx context.Context, args *GetMatchedStylesForNodeArgs) (reply *GetMatchedStylesForNodeReply, err error) {
reply = new(GetMatchedStylesForNodeReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.getMatchedStylesForNode", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.getMatchedStylesForNode", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "GetMatchedStylesForNode", Err: err}
}
return
} | go | {
"resource": ""
} |
q19112 | GetMediaQueries | train | func (d *domainClient) GetMediaQueries(ctx context.Context) (reply *GetMediaQueriesReply, err error) {
reply = new(GetMediaQueriesReply)
err = rpcc.Invoke(ctx, "CSS.getMediaQueries", nil, reply, d.conn)
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "GetMediaQueries", Err: err}
}
return
} | go | {
"resource": ""
} |
q19113 | GetPlatformFontsForNode | train | func (d *domainClient) GetPlatformFontsForNode(ctx context.Context, args *GetPlatformFontsForNodeArgs) (reply *GetPlatformFontsForNodeReply, err error) {
reply = new(GetPlatformFontsForNodeReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.getPlatformFontsForNode", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.getPlatformFontsForNode", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "GetPlatformFontsForNode", Err: err}
}
return
} | go | {
"resource": ""
} |
q19114 | GetStyleSheetText | train | func (d *domainClient) GetStyleSheetText(ctx context.Context, args *GetStyleSheetTextArgs) (reply *GetStyleSheetTextReply, err error) {
reply = new(GetStyleSheetTextReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.getStyleSheetText", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.getStyleSheetText", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "GetStyleSheetText", Err: err}
}
return
} | go | {
"resource": ""
} |
q19115 | SetEffectivePropertyValueForNode | train | func (d *domainClient) SetEffectivePropertyValueForNode(ctx context.Context, args *SetEffectivePropertyValueForNodeArgs) (err error) {
if args != nil {
err = rpcc.Invoke(ctx, "CSS.setEffectivePropertyValueForNode", args, nil, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.setEffectivePropertyValueForNode", nil, nil, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "SetEffectivePropertyValueForNode", Err: err}
}
return
} | go | {
"resource": ""
} |
q19116 | SetKeyframeKey | train | func (d *domainClient) SetKeyframeKey(ctx context.Context, args *SetKeyframeKeyArgs) (reply *SetKeyframeKeyReply, err error) {
reply = new(SetKeyframeKeyReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.setKeyframeKey", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.setKeyframeKey", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "SetKeyframeKey", Err: err}
}
return
} | go | {
"resource": ""
} |
q19117 | SetMediaText | train | func (d *domainClient) SetMediaText(ctx context.Context, args *SetMediaTextArgs) (reply *SetMediaTextReply, err error) {
reply = new(SetMediaTextReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.setMediaText", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.setMediaText", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "SetMediaText", Err: err}
}
return
} | go | {
"resource": ""
} |
q19118 | SetRuleSelector | train | func (d *domainClient) SetRuleSelector(ctx context.Context, args *SetRuleSelectorArgs) (reply *SetRuleSelectorReply, err error) {
reply = new(SetRuleSelectorReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.setRuleSelector", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.setRuleSelector", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "SetRuleSelector", Err: err}
}
return
} | go | {
"resource": ""
} |
q19119 | SetStyleSheetText | train | func (d *domainClient) SetStyleSheetText(ctx context.Context, args *SetStyleSheetTextArgs) (reply *SetStyleSheetTextReply, err error) {
reply = new(SetStyleSheetTextReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.setStyleSheetText", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.setStyleSheetText", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "SetStyleSheetText", Err: err}
}
return
} | go | {
"resource": ""
} |
q19120 | SetStyleTexts | train | func (d *domainClient) SetStyleTexts(ctx context.Context, args *SetStyleTextsArgs) (reply *SetStyleTextsReply, err error) {
reply = new(SetStyleTextsReply)
if args != nil {
err = rpcc.Invoke(ctx, "CSS.setStyleTexts", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CSS.setStyleTexts", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CSS", Op: "SetStyleTexts", Err: err}
}
return
} | go | {
"resource": ""
} |
q19121 | NewSetTimeDomainArgs | train | func NewSetTimeDomainArgs(timeDomain string) *SetTimeDomainArgs {
args := new(SetTimeDomainArgs)
args.TimeDomain = timeDomain
return args
} | go | {
"resource": ""
} |
q19122 | GetUsageAndQuota | train | func (d *domainClient) GetUsageAndQuota(ctx context.Context, args *GetUsageAndQuotaArgs) (reply *GetUsageAndQuotaReply, err error) {
reply = new(GetUsageAndQuotaReply)
if args != nil {
err = rpcc.Invoke(ctx, "Storage.getUsageAndQuota", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Storage.getUsageAndQuota", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Storage", Op: "GetUsageAndQuota", Err: err}
}
return
} | go | {
"resource": ""
} |
q19123 | NewClient | train | func NewClient(conn *rpcc.Conn) *Client {
return &Client{
Accessibility: accessibility.NewClient(conn),
Animation: animation.NewClient(conn),
ApplicationCache: applicationcache.NewClient(conn),
Audits: audits.NewClient(conn),
BackgroundService: backgroundservice.NewClient(conn),
Browser: browser.NewClient(conn),
CSS: css.NewClient(conn),
CacheStorage: cachestorage.NewClient(conn),
Cast: cast.NewClient(conn),
Console: console.NewClient(conn),
DOM: dom.NewClient(conn),
DOMDebugger: domdebugger.NewClient(conn),
DOMSnapshot: domsnapshot.NewClient(conn),
DOMStorage: domstorage.NewClient(conn),
Database: database.NewClient(conn),
Debugger: debugger.NewClient(conn),
DeviceOrientation: deviceorientation.NewClient(conn),
Emulation: emulation.NewClient(conn),
Fetch: fetch.NewClient(conn),
HeadlessExperimental: headlessexperimental.NewClient(conn),
HeapProfiler: heapprofiler.NewClient(conn),
IO: io.NewClient(conn),
IndexedDB: indexeddb.NewClient(conn),
Input: input.NewClient(conn),
Inspector: inspector.NewClient(conn),
LayerTree: layertree.NewClient(conn),
Log: log.NewClient(conn),
Memory: memory.NewClient(conn),
Network: network.NewClient(conn),
Overlay: overlay.NewClient(conn),
Page: page.NewClient(conn),
Performance: performance.NewClient(conn),
Profiler: profiler.NewClient(conn),
Runtime: runtime.NewClient(conn),
Schema: schema.NewClient(conn),
Security: security.NewClient(conn),
ServiceWorker: serviceworker.NewClient(conn),
Storage: storage.NewClient(conn),
SystemInfo: systeminfo.NewClient(conn),
Target: target.NewClient(conn),
Tethering: tethering.NewClient(conn),
Tracing: tracing.NewClient(conn),
}
} | go | {
"resource": ""
} |
q19124 | NewHighlightFrameArgs | train | func NewHighlightFrameArgs(frameID page.FrameID) *HighlightFrameArgs {
args := new(HighlightFrameArgs)
args.FrameID = frameID
return args
} | go | {
"resource": ""
} |
q19125 | NewHighlightNodeArgs | train | func NewHighlightNodeArgs(highlightConfig HighlightConfig) *HighlightNodeArgs {
args := new(HighlightNodeArgs)
args.HighlightConfig = highlightConfig
return args
} | go | {
"resource": ""
} |
q19126 | SetNodeID | train | func (a *HighlightNodeArgs) SetNodeID(nodeID dom.NodeID) *HighlightNodeArgs {
a.NodeID = &nodeID
return a
} | go | {
"resource": ""
} |
q19127 | SetBackendNodeID | train | func (a *HighlightNodeArgs) SetBackendNodeID(backendNodeID dom.BackendNodeID) *HighlightNodeArgs {
a.BackendNodeID = &backendNodeID
return a
} | go | {
"resource": ""
} |
q19128 | SetObjectID | train | func (a *HighlightNodeArgs) SetObjectID(objectID runtime.RemoteObjectID) *HighlightNodeArgs {
a.ObjectID = &objectID
return a
} | go | {
"resource": ""
} |
q19129 | SetSelector | train | func (a *HighlightNodeArgs) SetSelector(selector string) *HighlightNodeArgs {
a.Selector = &selector
return a
} | go | {
"resource": ""
} |
q19130 | NewHighlightQuadArgs | train | func NewHighlightQuadArgs(quad dom.Quad) *HighlightQuadArgs {
args := new(HighlightQuadArgs)
args.Quad = quad
return args
} | go | {
"resource": ""
} |
q19131 | NewHighlightRectArgs | train | func NewHighlightRectArgs(x int, y int, width int, height int) *HighlightRectArgs {
args := new(HighlightRectArgs)
args.X = x
args.Y = y
args.Width = width
args.Height = height
return args
} | go | {
"resource": ""
} |
q19132 | NewSetInspectModeArgs | train | func NewSetInspectModeArgs(mode InspectMode) *SetInspectModeArgs {
args := new(SetInspectModeArgs)
args.Mode = mode
return args
} | go | {
"resource": ""
} |
q19133 | SetHighlightConfig | train | func (a *SetInspectModeArgs) SetHighlightConfig(highlightConfig HighlightConfig) *SetInspectModeArgs {
a.HighlightConfig = &highlightConfig
return a
} | go | {
"resource": ""
} |
q19134 | NewSetShowAdHighlightsArgs | train | func NewSetShowAdHighlightsArgs(show bool) *SetShowAdHighlightsArgs {
args := new(SetShowAdHighlightsArgs)
args.Show = show
return args
} | go | {
"resource": ""
} |
q19135 | SetMessage | train | func (a *SetPausedInDebuggerMessageArgs) SetMessage(message string) *SetPausedInDebuggerMessageArgs {
a.Message = &message
return a
} | go | {
"resource": ""
} |
q19136 | NewSetShowDebugBordersArgs | train | func NewSetShowDebugBordersArgs(show bool) *SetShowDebugBordersArgs {
args := new(SetShowDebugBordersArgs)
args.Show = show
return args
} | go | {
"resource": ""
} |
q19137 | NewSetShowFPSCounterArgs | train | func NewSetShowFPSCounterArgs(show bool) *SetShowFPSCounterArgs {
args := new(SetShowFPSCounterArgs)
args.Show = show
return args
} | go | {
"resource": ""
} |
q19138 | NewSetShowPaintRectsArgs | train | func NewSetShowPaintRectsArgs(result bool) *SetShowPaintRectsArgs {
args := new(SetShowPaintRectsArgs)
args.Result = result
return args
} | go | {
"resource": ""
} |
q19139 | NewSetShowScrollBottleneckRectsArgs | train | func NewSetShowScrollBottleneckRectsArgs(show bool) *SetShowScrollBottleneckRectsArgs {
args := new(SetShowScrollBottleneckRectsArgs)
args.Show = show
return args
} | go | {
"resource": ""
} |
q19140 | NewSetShowViewportSizeOnResizeArgs | train | func NewSetShowViewportSizeOnResizeArgs(show bool) *SetShowViewportSizeOnResizeArgs {
args := new(SetShowViewportSizeOnResizeArgs)
args.Show = show
return args
} | go | {
"resource": ""
} |
q19141 | NewDeleteCacheArgs | train | func NewDeleteCacheArgs(cacheID CacheID) *DeleteCacheArgs {
args := new(DeleteCacheArgs)
args.CacheID = cacheID
return args
} | go | {
"resource": ""
} |
q19142 | NewDeleteEntryArgs | train | func NewDeleteEntryArgs(cacheID CacheID, request string) *DeleteEntryArgs {
args := new(DeleteEntryArgs)
args.CacheID = cacheID
args.Request = request
return args
} | go | {
"resource": ""
} |
q19143 | NewRequestCacheNamesArgs | train | func NewRequestCacheNamesArgs(securityOrigin string) *RequestCacheNamesArgs {
args := new(RequestCacheNamesArgs)
args.SecurityOrigin = securityOrigin
return args
} | go | {
"resource": ""
} |
q19144 | NewRequestCachedResponseArgs | train | func NewRequestCachedResponseArgs(cacheID CacheID, requestURL string, requestHeaders []Header) *RequestCachedResponseArgs {
args := new(RequestCachedResponseArgs)
args.CacheID = cacheID
args.RequestURL = requestURL
args.RequestHeaders = requestHeaders
return args
} | go | {
"resource": ""
} |
q19145 | NewRequestEntriesArgs | train | func NewRequestEntriesArgs(cacheID CacheID, skipCount int, pageSize int) *RequestEntriesArgs {
args := new(RequestEntriesArgs)
args.CacheID = cacheID
args.SkipCount = skipCount
args.PageSize = pageSize
return args
} | go | {
"resource": ""
} |
q19146 | SetPathFilter | train | func (a *RequestEntriesArgs) SetPathFilter(pathFilter string) *RequestEntriesArgs {
a.PathFilter = &pathFilter
return a
} | go | {
"resource": ""
} |
q19147 | GetCertificate | train | func (d *domainClient) GetCertificate(ctx context.Context, args *GetCertificateArgs) (reply *GetCertificateReply, err error) {
reply = new(GetCertificateReply)
if args != nil {
err = rpcc.Invoke(ctx, "Network.getCertificate", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Network.getCertificate", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Network", Op: "GetCertificate", Err: err}
}
return
} | go | {
"resource": ""
} |
q19148 | GetCookies | train | func (d *domainClient) GetCookies(ctx context.Context, args *GetCookiesArgs) (reply *GetCookiesReply, err error) {
reply = new(GetCookiesReply)
if args != nil {
err = rpcc.Invoke(ctx, "Network.getCookies", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Network.getCookies", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Network", Op: "GetCookies", Err: err}
}
return
} | go | {
"resource": ""
} |
q19149 | GetRequestPostData | train | func (d *domainClient) GetRequestPostData(ctx context.Context, args *GetRequestPostDataArgs) (reply *GetRequestPostDataReply, err error) {
reply = new(GetRequestPostDataReply)
if args != nil {
err = rpcc.Invoke(ctx, "Network.getRequestPostData", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Network.getRequestPostData", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Network", Op: "GetRequestPostData", Err: err}
}
return
} | go | {
"resource": ""
} |
q19150 | GetResponseBodyForInterception | train | func (d *domainClient) GetResponseBodyForInterception(ctx context.Context, args *GetResponseBodyForInterceptionArgs) (reply *GetResponseBodyForInterceptionReply, err error) {
reply = new(GetResponseBodyForInterceptionReply)
if args != nil {
err = rpcc.Invoke(ctx, "Network.getResponseBodyForInterception", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Network.getResponseBodyForInterception", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Network", Op: "GetResponseBodyForInterception", Err: err}
}
return
} | go | {
"resource": ""
} |
q19151 | SearchInResponseBody | train | func (d *domainClient) SearchInResponseBody(ctx context.Context, args *SearchInResponseBodyArgs) (reply *SearchInResponseBodyReply, err error) {
reply = new(SearchInResponseBodyReply)
if args != nil {
err = rpcc.Invoke(ctx, "Network.searchInResponseBody", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Network.searchInResponseBody", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Network", Op: "SearchInResponseBody", Err: err}
}
return
} | go | {
"resource": ""
} |
q19152 | SetCookie | train | func (d *domainClient) SetCookie(ctx context.Context, args *SetCookieArgs) (reply *SetCookieReply, err error) {
reply = new(SetCookieReply)
if args != nil {
err = rpcc.Invoke(ctx, "Network.setCookie", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Network.setCookie", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Network", Op: "SetCookie", Err: err}
}
return
} | go | {
"resource": ""
} |
q19153 | NewGetEventListenersArgs | train | func NewGetEventListenersArgs(objectID runtime.RemoteObjectID) *GetEventListenersArgs {
args := new(GetEventListenersArgs)
args.ObjectID = objectID
return args
} | go | {
"resource": ""
} |
q19154 | SetDepth | train | func (a *GetEventListenersArgs) SetDepth(depth int) *GetEventListenersArgs {
a.Depth = &depth
return a
} | go | {
"resource": ""
} |
q19155 | NewRemoveDOMBreakpointArgs | train | func NewRemoveDOMBreakpointArgs(nodeID dom.NodeID, typ DOMBreakpointType) *RemoveDOMBreakpointArgs {
args := new(RemoveDOMBreakpointArgs)
args.NodeID = nodeID
args.Type = typ
return args
} | go | {
"resource": ""
} |
q19156 | NewRemoveEventListenerBreakpointArgs | train | func NewRemoveEventListenerBreakpointArgs(eventName string) *RemoveEventListenerBreakpointArgs {
args := new(RemoveEventListenerBreakpointArgs)
args.EventName = eventName
return args
} | go | {
"resource": ""
} |
q19157 | NewRemoveInstrumentationBreakpointArgs | train | func NewRemoveInstrumentationBreakpointArgs(eventName string) *RemoveInstrumentationBreakpointArgs {
args := new(RemoveInstrumentationBreakpointArgs)
args.EventName = eventName
return args
} | go | {
"resource": ""
} |
q19158 | NewRemoveXHRBreakpointArgs | train | func NewRemoveXHRBreakpointArgs(url string) *RemoveXHRBreakpointArgs {
args := new(RemoveXHRBreakpointArgs)
args.URL = url
return args
} | go | {
"resource": ""
} |
q19159 | NewSetDOMBreakpointArgs | train | func NewSetDOMBreakpointArgs(nodeID dom.NodeID, typ DOMBreakpointType) *SetDOMBreakpointArgs {
args := new(SetDOMBreakpointArgs)
args.NodeID = nodeID
args.Type = typ
return args
} | go | {
"resource": ""
} |
q19160 | NewSetEventListenerBreakpointArgs | train | func NewSetEventListenerBreakpointArgs(eventName string) *SetEventListenerBreakpointArgs {
args := new(SetEventListenerBreakpointArgs)
args.EventName = eventName
return args
} | go | {
"resource": ""
} |
q19161 | NewSetInstrumentationBreakpointArgs | train | func NewSetInstrumentationBreakpointArgs(eventName string) *SetInstrumentationBreakpointArgs {
args := new(SetInstrumentationBreakpointArgs)
args.EventName = eventName
return args
} | go | {
"resource": ""
} |
q19162 | NewSetXHRBreakpointArgs | train | func NewSetXHRBreakpointArgs(url string) *SetXHRBreakpointArgs {
args := new(SetXHRBreakpointArgs)
args.URL = url
return args
} | go | {
"resource": ""
} |
q19163 | SetPatterns | train | func (a *EnableArgs) SetPatterns(patterns []RequestPattern) *EnableArgs {
a.Patterns = patterns
return a
} | go | {
"resource": ""
} |
q19164 | SetHandleAuthRequests | train | func (a *EnableArgs) SetHandleAuthRequests(handleAuthRequests bool) *EnableArgs {
a.HandleAuthRequests = &handleAuthRequests
return a
} | go | {
"resource": ""
} |
q19165 | NewFailRequestArgs | train | func NewFailRequestArgs(requestID RequestID, errorReason network.ErrorReason) *FailRequestArgs {
args := new(FailRequestArgs)
args.RequestID = requestID
args.ErrorReason = errorReason
return args
} | go | {
"resource": ""
} |
q19166 | NewFulfillRequestArgs | train | func NewFulfillRequestArgs(requestID RequestID, responseCode int, responseHeaders []HeaderEntry) *FulfillRequestArgs {
args := new(FulfillRequestArgs)
args.RequestID = requestID
args.ResponseCode = responseCode
args.ResponseHeaders = responseHeaders
return args
} | go | {
"resource": ""
} |
q19167 | SetBody | train | func (a *FulfillRequestArgs) SetBody(body string) *FulfillRequestArgs {
a.Body = &body
return a
} | go | {
"resource": ""
} |
q19168 | SetResponsePhrase | train | func (a *FulfillRequestArgs) SetResponsePhrase(responsePhrase string) *FulfillRequestArgs {
a.ResponsePhrase = &responsePhrase
return a
} | go | {
"resource": ""
} |
q19169 | NewContinueRequestArgs | train | func NewContinueRequestArgs(requestID RequestID) *ContinueRequestArgs {
args := new(ContinueRequestArgs)
args.RequestID = requestID
return args
} | go | {
"resource": ""
} |
q19170 | SetURL | train | func (a *ContinueRequestArgs) SetURL(url string) *ContinueRequestArgs {
a.URL = &url
return a
} | go | {
"resource": ""
} |
q19171 | SetMethod | train | func (a *ContinueRequestArgs) SetMethod(method string) *ContinueRequestArgs {
a.Method = &method
return a
} | go | {
"resource": ""
} |
q19172 | SetPostData | train | func (a *ContinueRequestArgs) SetPostData(postData string) *ContinueRequestArgs {
a.PostData = &postData
return a
} | go | {
"resource": ""
} |
q19173 | SetHeaders | train | func (a *ContinueRequestArgs) SetHeaders(headers []HeaderEntry) *ContinueRequestArgs {
a.Headers = headers
return a
} | go | {
"resource": ""
} |
q19174 | NewContinueWithAuthArgs | train | func NewContinueWithAuthArgs(requestID RequestID, authChallengeResponse AuthChallengeResponse) *ContinueWithAuthArgs {
args := new(ContinueWithAuthArgs)
args.RequestID = requestID
args.AuthChallengeResponse = authChallengeResponse
return args
} | go | {
"resource": ""
} |
q19175 | NewTakeResponseBodyAsStreamArgs | train | func NewTakeResponseBodyAsStreamArgs(requestID RequestID) *TakeResponseBodyAsStreamArgs {
args := new(TakeResponseBodyAsStreamArgs)
args.RequestID = requestID
return args
} | go | {
"resource": ""
} |
q19176 | NewSetDeviceOrientationOverrideArgs | train | func NewSetDeviceOrientationOverrideArgs(alpha float64, beta float64, gamma float64) *SetDeviceOrientationOverrideArgs {
args := new(SetDeviceOrientationOverrideArgs)
args.Alpha = alpha
args.Beta = beta
args.Gamma = gamma
return args
} | go | {
"resource": ""
} |
q19177 | Error | train | func (r ExceptionDetails) Error() string {
var desc string
if r.Exception.Description != nil {
desc = ": " + *r.Exception.Description
}
return fmt.Sprintf("runtime.ExceptionDetails: %s exception at %d:%d%s", r.Text, r.LineNumber, r.ColumnNumber, desc)
} | go | {
"resource": ""
} |
q19178 | String | train | func (r RemoteObject) String() string {
switch r.Type {
case "undefined":
return "undefined"
case "object":
switch {
case r.Preview != nil:
return r.Preview.String()
}
default:
if r.UnserializableValue != nil {
return string(*r.UnserializableValue)
}
}
if len(r.Value) == 0 && r.Description != nil {
return *r.Description
}
return string(r.Value)
} | go | {
"resource": ""
} |
q19179 | String | train | func (r ObjectPreview) String() string {
var desc string
if r.Description != nil {
desc = *r.Description
}
switch r.Type {
case "object":
var stype string
if r.Subtype != nil {
stype = *r.Subtype
}
switch stype {
case "null":
return "null"
case "array", "typedarray":
return r.arrayString(desc)
case "date", "regexp":
return desc
default:
if val, ok := primitiveValue(r.Properties); ok {
return fmt.Sprintf("%s(%s)", desc, val)
}
}
return r.objectString(desc)
case "string":
return fmt.Sprintf("%q", desc)
default:
return desc
}
} | go | {
"resource": ""
} |
q19180 | String | train | func (r EntryPreview) String() string {
var b bytes.Buffer
if r.Key != nil {
b.WriteString(r.Key.String())
b.WriteString(" => ")
}
b.WriteString(r.Value.String())
return b.String()
} | go | {
"resource": ""
} |
q19181 | EvaluateOnCallFrame | train | func (d *domainClient) EvaluateOnCallFrame(ctx context.Context, args *EvaluateOnCallFrameArgs) (reply *EvaluateOnCallFrameReply, err error) {
reply = new(EvaluateOnCallFrameReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.evaluateOnCallFrame", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.evaluateOnCallFrame", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "EvaluateOnCallFrame", Err: err}
}
return
} | go | {
"resource": ""
} |
q19182 | GetPossibleBreakpoints | train | func (d *domainClient) GetPossibleBreakpoints(ctx context.Context, args *GetPossibleBreakpointsArgs) (reply *GetPossibleBreakpointsReply, err error) {
reply = new(GetPossibleBreakpointsReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.getPossibleBreakpoints", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.getPossibleBreakpoints", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "GetPossibleBreakpoints", Err: err}
}
return
} | go | {
"resource": ""
} |
q19183 | GetScriptSource | train | func (d *domainClient) GetScriptSource(ctx context.Context, args *GetScriptSourceArgs) (reply *GetScriptSourceReply, err error) {
reply = new(GetScriptSourceReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.getScriptSource", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.getScriptSource", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "GetScriptSource", Err: err}
}
return
} | go | {
"resource": ""
} |
q19184 | GetStackTrace | train | func (d *domainClient) GetStackTrace(ctx context.Context, args *GetStackTraceArgs) (reply *GetStackTraceReply, err error) {
reply = new(GetStackTraceReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.getStackTrace", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.getStackTrace", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "GetStackTrace", Err: err}
}
return
} | go | {
"resource": ""
} |
q19185 | RestartFrame | train | func (d *domainClient) RestartFrame(ctx context.Context, args *RestartFrameArgs) (reply *RestartFrameReply, err error) {
reply = new(RestartFrameReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.restartFrame", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.restartFrame", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "RestartFrame", Err: err}
}
return
} | go | {
"resource": ""
} |
q19186 | SearchInContent | train | func (d *domainClient) SearchInContent(ctx context.Context, args *SearchInContentArgs) (reply *SearchInContentReply, err error) {
reply = new(SearchInContentReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.searchInContent", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.searchInContent", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "SearchInContent", Err: err}
}
return
} | go | {
"resource": ""
} |
q19187 | SetBreakpoint | train | func (d *domainClient) SetBreakpoint(ctx context.Context, args *SetBreakpointArgs) (reply *SetBreakpointReply, err error) {
reply = new(SetBreakpointReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.setBreakpoint", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.setBreakpoint", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "SetBreakpoint", Err: err}
}
return
} | go | {
"resource": ""
} |
q19188 | SetBreakpointByURL | train | func (d *domainClient) SetBreakpointByURL(ctx context.Context, args *SetBreakpointByURLArgs) (reply *SetBreakpointByURLReply, err error) {
reply = new(SetBreakpointByURLReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.setBreakpointByUrl", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.setBreakpointByUrl", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "SetBreakpointByURL", Err: err}
}
return
} | go | {
"resource": ""
} |
q19189 | SetBreakpointOnFunctionCall | train | func (d *domainClient) SetBreakpointOnFunctionCall(ctx context.Context, args *SetBreakpointOnFunctionCallArgs) (reply *SetBreakpointOnFunctionCallReply, err error) {
reply = new(SetBreakpointOnFunctionCallReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.setBreakpointOnFunctionCall", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.setBreakpointOnFunctionCall", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "SetBreakpointOnFunctionCall", Err: err}
}
return
} | go | {
"resource": ""
} |
q19190 | SetScriptSource | train | func (d *domainClient) SetScriptSource(ctx context.Context, args *SetScriptSourceArgs) (reply *SetScriptSourceReply, err error) {
reply = new(SetScriptSourceReply)
if args != nil {
err = rpcc.Invoke(ctx, "Debugger.setScriptSource", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Debugger.setScriptSource", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Debugger", Op: "SetScriptSource", Err: err}
}
return
} | go | {
"resource": ""
} |
q19191 | Close | train | func (m *Manager) Close() error {
m.cancel()
if m.done != nil {
return errors.Wrapf(<-m.done, "session.Manager: close failed")
}
return nil
} | go | {
"resource": ""
} |
q19192 | NewManager | train | func NewManager(c *cdp.Client) (*Manager, error) {
m := &Manager{
c: c,
sC: make(chan *session),
errC: make(chan error, 1),
}
// TODO(mafredri): Inherit the context from rpcc.Conn in cdp.Client.
// cdp.Client does not yet expose the context, nor rpcc.Conn.
m.ctx, m.cancel = context.WithCancel(context.TODO())
ev, err := newSessionEvents(m.ctx, c)
if err != nil {
close(m.errC)
m.Close()
return nil, err
}
m.done = make(chan error, 1)
go m.watch(ev, m.sC, m.done, m.errC)
return m, nil
} | go | {
"resource": ""
} |
q19193 | NewDispatchKeyEventArgs | train | func NewDispatchKeyEventArgs(typ string) *DispatchKeyEventArgs {
args := new(DispatchKeyEventArgs)
args.Type = typ
return args
} | go | {
"resource": ""
} |
q19194 | NewInsertTextArgs | train | func NewInsertTextArgs(text string) *InsertTextArgs {
args := new(InsertTextArgs)
args.Text = text
return args
} | go | {
"resource": ""
} |
q19195 | NewDispatchMouseEventArgs | train | func NewDispatchMouseEventArgs(typ string, x float64, y float64) *DispatchMouseEventArgs {
args := new(DispatchMouseEventArgs)
args.Type = typ
args.X = x
args.Y = y
return args
} | go | {
"resource": ""
} |
q19196 | SetButtons | train | func (a *DispatchMouseEventArgs) SetButtons(buttons int) *DispatchMouseEventArgs {
a.Buttons = &buttons
return a
} | go | {
"resource": ""
} |
q19197 | NewDispatchTouchEventArgs | train | func NewDispatchTouchEventArgs(typ string, touchPoints []TouchPoint) *DispatchTouchEventArgs {
args := new(DispatchTouchEventArgs)
args.Type = typ
args.TouchPoints = touchPoints
return args
} | go | {
"resource": ""
} |
q19198 | NewEmulateTouchFromMouseEventArgs | train | func NewEmulateTouchFromMouseEventArgs(typ string, x int, y int, button string) *EmulateTouchFromMouseEventArgs {
args := new(EmulateTouchFromMouseEventArgs)
args.Type = typ
args.X = x
args.Y = y
args.Button = button
return args
} | go | {
"resource": ""
} |
q19199 | NewSetIgnoreInputEventsArgs | train | func NewSetIgnoreInputEventsArgs(ignore bool) *SetIgnoreInputEventsArgs {
args := new(SetIgnoreInputEventsArgs)
args.Ignore = ignore
return args
} | go | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.