mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
Merge pull request #142 from deoxxa/add-debugger-hook
add a way to trigger something with `debugger`
This commit is contained in:
4
otto.go
4
otto.go
@@ -359,6 +359,10 @@ func (self Otto) setValue(name string, value Value) {
|
||||
self.runtime.globalStash.setValue(name, value, false)
|
||||
}
|
||||
|
||||
func (self Otto) SetDebuggerHandler(fn func(vm *Otto)) {
|
||||
self.runtime.debugger = fn
|
||||
}
|
||||
|
||||
// Call the given JavaScript with a given this and arguments.
|
||||
//
|
||||
// If this is nil, then some special handling takes place to determine the proper
|
||||
|
||||
Reference in New Issue
Block a user