/
raw_debugger.go
44 lines (37 loc) · 1.4 KB
/
raw_debugger.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package electron
import "github.com/oskca/gopherjs-nodejs/events"
import "github.com/gopherjs/gopherjs/js"
// events
const (
// Emitted when debugging session is terminated. This happens either when webContents is closed or devtools is invoked for the attached webContents.
EvtDebuggerDetach = "detach"
// Emitted whenever debugging target issues instrumentation event.
EvtDebuggerMessage = "message"
)
// Debugger version@1.4.15
//
// An alternate transport for Chrome's remote debugging protocol.
type Debugger struct {
*events.Emitter
// Attaches the debugger to the webContents.
Attach func(ProtocolVersion string) `js:"attach"`
IsAttached func() (Obj bool) `js:"isAttached"`
// Detaches the debugger from the webContents.
Detach func() `js:"detach"`
// Send given command to the debugging target.
SendCommand func(Method string, CommandParams *DebuggerSendCommandCommandParams, Callback DebuggerSendCommandCallback) `js:"sendCommand"`
}
func WrapDebugger(o *js.Object) *Debugger {
return &Debugger{
Emitter: events.New(o),
}
}
type DebuggerSendCommandCommandParams struct {
*js.Object
}
type DebuggerSendCommandCallback func( // Error message indicating the failure of the command.
Error *DebuggerCallbackError, // Response defined by the 'returns' attribute of the command description in the remote debugging protocol.
Result *js.Object)
type DebuggerCallbackError struct {
*js.Object
}