func (dom *DOM) NewJsFunc(fn func()) js.Func {
	return js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		defer dom.AlertOnPanic()
		fn()
		return nil
	})
}
// NewJsFunc creates a new javascript function from the provided function.
NewJsFunc creates a new javascript function from the provided function.
// NewJsFunc creates a new javascript function from the provided function .
func (dom *DOM) NewJsFunc(fn func()) js.Func {
	return js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		defer dom.AlertOnPanic()
		fn()
		return nil
	})
}
func ( dom * DOM ) NewJsFunc ( fn func ( ) ) js . Func { return js . FuncOf ( func ( this js . Value , args [ ] js . Value ) interface { } { defer dom . AlertOnPanic ( ) fn ( ) return nil } ) }
NewJsFunc creates a new javascript function from the provided function.
NewJsFunc creates a new javascript function from the provided function .