Documentation ¶
Index ¶
- Constants
- type Context
- func (d *Context) Alloc(size int) unsafe.Pointer
- func (d *Context) AllocRaw(size int) unsafe.Pointer
- func (d *Context) Base64Decode(index int)
- func (d *Context) Base64Encode(index int) string
- func (d *Context) Call(nargs int)
- func (d *Context) CallMethod(nargs int)
- func (d *Context) CallProp(objIndex int, nargs int)
- func (d *Context) CheckStack(extra int) bool
- func (d *Context) CheckStackTop(top int) bool
- func (d *Context) CheckType(index int, typ int) bool
- func (d *Context) CheckTypeMask(index int, mask uint) bool
- func (d *Context) Compact(objIndex int)
- func (d *Context) Compile(flags uint)
- func (d *Context) CompileFile(flags uint, path string)
- func (d *Context) CompileLstring(flags uint, src string, lenght int)
- func (d *Context) CompileLstringFilename(flags uint, src string, lenght int)
- func (d *Context) CompileString(flags uint, src string)
- func (d *Context) CompileStringFilename(flags uint, src string)
- func (d *Context) Concat(count int)
- func (d *Context) ConfigBuffer(bufferIdx int, buffer []byte)
- func (d *Context) Copy(fromIndex int, toIndex int)
- func (d *Context) DebuggerAttach(readFn, writeFn, peekFn, readFlushFn, writeFlushFn, detachedFn *[0]byte, ...)
- func (d *Context) DebuggerCooperate()
- func (d *Context) DebuggerDetach()
- func (d *Context) DefProp(objIndex int, flags uint)
- func (d *Context) DelProp(objIndex int) bool
- func (d *Context) DelPropIndex(objIndex int, arrIndex uint) bool
- func (d *Context) DelPropString(objIndex int, key string) bool
- func (d *Context) Destroy()
- func (d *Context) DestroyHeap()
- func (d *Context) DumpContextStderr()
- func (d *Context) DumpContextStdout()
- func (d *Context) DumpFunction()
- func (d *Context) Dup(fromIndex int)
- func (d *Context) DupTop()
- func (d *Context) Enum(objIndex int, enumFlags uint)
- func (d *Context) Equals(index1 int, index2 int) bool
- func (d *Context) Error(errCode int, str string)
- func (d *Context) ErrorRaw(errCode int, filename string, line int, errMsg string)
- func (d *Context) ErrorVa(errCode int, a ...interface{})
- func (d *Context) Errorf(errCode int, format string, a ...interface{})
- func (d *Context) Eval()
- func (d *Context) EvalFile(path string)
- func (d *Context) EvalFileNoresult(path string)
- func (d *Context) EvalLstring(src string, lenght int)
- func (d *Context) EvalLstringNoresult(src string, lenght int)
- func (d *Context) EvalNoresult()
- func (d *Context) EvalString(src string)
- func (d *Context) EvalStringNoresult(src string)
- func (d *Context) Fatal(errCode int, errMsg string)
- func (d *Context) FlushTimers()
- func (d *Context) Gc(flags uint)
- func (d *Context) GetBoolean(index int) bool
- func (d *Context) GetBuffer(index int) (rawPtr unsafe.Pointer, outSize uint)
- func (d *Context) GetContext(index int) *Context
- func (d *Context) GetCurrentMagic() int
- func (d *Context) GetErrorCode(index int) int
- func (d *Context) GetFinalizer(index int)
- func (d *Context) GetGlobalString(key string) bool
- func (d *Context) GetHeapptr(index int) unsafe.Pointer
- func (d *Context) GetInt(index int) int
- func (d *Context) GetLength(index int) int
- func (d *Context) GetLstring(index int) string
- func (d *Context) GetMagic(index int) int
- func (d *Context) GetNumber(index int) float64
- func (d *Context) GetPointer(index int) unsafe.Pointer
- func (d *Context) GetProp(objIndex int) bool
- func (d *Context) GetPropIndex(objIndex int, arrIndex uint) bool
- func (d *Context) GetPropString(objIndex int, key string) bool
- func (d *Context) GetPrototype(index int)
- func (d *Context) GetString(i int) string
- func (d *Context) GetTop() int
- func (d *Context) GetTopIndex() int
- func (d *Context) GetType(index int) Type
- func (d *Context) GetTypeMask(index int) uint
- func (d *Context) GetUint(index int) uint
- func (d *Context) HasProp(objIndex int) bool
- func (d *Context) HasPropIndex(objIndex int, arrIndex uint) bool
- func (d *Context) HasPropString(objIndex int, key string) bool
- func (d *Context) HexDecode(index int)
- func (d *Context) HexEncode(index int) string
- func (d *Context) Insert(toIndex int)
- func (d *Context) Instanceof(idx1, idx2 int) bool
- func (d *Context) IsArray(index int) bool
- func (d *Context) IsBoolean(index int) bool
- func (d *Context) IsBoundFunction(index int) bool
- func (d *Context) IsBuffer(index int) bool
- func (d *Context) IsCFunction(index int) bool
- func (d *Context) IsCallable(index int) bool
- func (d *Context) IsConstructorCall() bool
- func (d *Context) IsDynamicBuffer(index int) bool
- func (d *Context) IsEcmascriptFunction(index int) bool
- func (d *Context) IsError(index int) bool
- func (d *Context) IsFixedBuffer(index int) bool
- func (d *Context) IsFunction(index int) bool
- func (d *Context) IsLightfunc(index int) bool
- func (d *Context) IsNan(index int) bool
- func (d *Context) IsNull(index int) bool
- func (d *Context) IsNullOrUndefined(index int) bool
- func (d *Context) IsNumber(index int) bool
- func (d *Context) IsObject(index int) bool
- func (d *Context) IsObjectCoercible(index int) bool
- func (d *Context) IsPointer(index int) bool
- func (d *Context) IsPrimitive(index int) bool
- func (d *Context) IsStrictCall() bool
- func (d *Context) IsString(index int) bool
- func (d *Context) IsThread(index int) bool
- func (d *Context) IsUndefined(index int) bool
- func (d *Context) IsValidIndex(index int) bool
- func (d *Context) Join(count int)
- func (d *Context) JsonDecode(index int)
- func (d *Context) JsonEncode(index int) string
- func (d *Context) LoadFunction()
- func (d *Context) Log(loglevel int, format string, value interface{})
- func (d *Context) LogVa(logLevel int, format string, values ...interface{})
- func (d *Context) Must() *Context
- func (d *Context) New(nargs int)
- func (d *Context) Next(enumIndex int, getValue bool) bool
- func (d *Context) NormalizeIndex(index int) int
- func (d *Context) Pcall(nargs int) int
- func (d *Context) PcallMethod(nargs int) int
- func (d *Context) PcallProp(objIndex int, nargs int) int
- func (d *Context) Pcompile(flags uint) error
- func (d *Context) PcompileFile(flags uint, path string) error
- func (d *Context) PcompileLstring(flags uint, src string, lenght int) error
- func (d *Context) PcompileLstringFilename(flags uint, src string, lenght int) error
- func (d *Context) PcompileString(flags uint, src string) error
- func (d *Context) PcompileStringFilename(flags uint, src string) error
- func (d *Context) Peval() error
- func (d *Context) PevalFile(path string) error
- func (d *Context) PevalFileNoresult(path string) int
- func (d *Context) PevalLstring(src string, lenght int) error
- func (d *Context) PevalLstringNoresult(src string, lenght int) int
- func (d *Context) PevalNoresult() int
- func (d *Context) PevalString(src string) error
- func (d *Context) PevalStringNoresult(src string) int
- func (d *Context) Pnew(nargs int) error
- func (d *Context) Pop()
- func (d *Context) Pop2()
- func (d *Context) Pop3()
- func (d *Context) PopN(count int)
- func (d *Context) PushArray() int
- func (d *Context) PushBoolean(val bool)
- func (d *Context) PushBuffer(size int, dynamic bool) unsafe.Pointer
- func (d *Context) PushBufferObject(bufferIdx, size, length int, flags uint)
- func (d *Context) PushCFunction(fn *[0]byte, nargs int64) int
- func (d *Context) PushCLightfunc(fn *[0]byte, nargs, length, magic int) int
- func (d *Context) PushContextDump()
- func (d *Context) PushCurrentFunction()
- func (d *Context) PushCurrentThread()
- func (d *Context) PushDynamicBuffer(size int) unsafe.Pointer
- func (d *Context) PushErrorObject(errCode int, format string, value interface{})
- func (d *Context) PushErrorObjectVa(errCode int, format string, values ...interface{})
- func (d *Context) PushExternalBuffer()
- func (d *Context) PushFalse()
- func (d *Context) PushFixedBuffer(size int) unsafe.Pointer
- func (d *Context) PushGlobalGoFunction(name string, fn func(*Context) int) (int, error)
- func (d *Context) PushGlobalObject()
- func (d *Context) PushGlobalStash()
- func (d *Context) PushGoFunction(fn func(*Context) int) int
- func (d *Context) PushHeapStash()
- func (d *Context) PushHeapptr(ptr unsafe.Pointer)
- func (d *Context) PushInt(val int)
- func (d *Context) PushLstring(str string, lenght int) string
- func (d *Context) PushNan()
- func (d *Context) PushNull()
- func (d *Context) PushNumber(val float64)
- func (d *Context) PushObject() int
- func (d *Context) PushPointer(p unsafe.Pointer)
- func (d *Context) PushString(str string) string
- func (d *Context) PushStringFile(path string) string
- func (d *Context) PushThis()
- func (d *Context) PushThread() int
- func (d *Context) PushThreadNewGlobalenv() int
- func (d *Context) PushThreadStash(targetCtx *Context)
- func (d *Context) PushTimers() error
- func (d *Context) PushTrue()
- func (d *Context) PushUint(val uint)
- func (d *Context) PushUndefined()
- func (d *Context) PutGlobalString(key string) bool
- func (d *Context) PutProp(objIndex int) bool
- func (d *Context) PutPropIndex(objIndex int, arrIndex uint) bool
- func (d *Context) PutPropString(objIndex int, key string) bool
- func (d *Context) Remove(index int)
- func (d *Context) Replace(toIndex int)
- func (d *Context) RequireBoolean(index int) bool
- func (d *Context) RequireBuffer(index int) (rawPtr unsafe.Pointer, outSize uint)
- func (d *Context) RequireCallable(index int)
- func (d *Context) RequireContext(index int) *Context
- func (d *Context) RequireFunction(index int)
- func (d *Context) RequireHeapptr(index int) unsafe.Pointer
- func (d *Context) RequireInt(index int) int
- func (d *Context) RequireLstring(index int) string
- func (d *Context) RequireNormalizeIndex(index int) int
- func (d *Context) RequireNull(index int)
- func (d *Context) RequireNumber(index int) float64
- func (d *Context) RequireObjectCoercible(index int)
- func (d *Context) RequirePointer(index int) unsafe.Pointer
- func (d *Context) RequireStack(extra int)
- func (d *Context) RequireStackTop(top int)
- func (d *Context) RequireString(index int) string
- func (d *Context) RequireTopIndex() int
- func (d *Context) RequireTypeMask(index int, mask uint)
- func (d *Context) RequireUint(index int) uint
- func (d *Context) RequireUndefined(index int)
- func (d *Context) RequireValidIndex(index int)
- func (d *Context) ResizeBuffer(index int, newSize int) unsafe.Pointer
- func (d *Context) SafeCall(fn, args *[0]byte, nargs, nrets int) int
- func (d *Context) SafeToLstring(index int) string
- func (d *Context) SafeToString(index int) string
- func (d *Context) SetFinalizer(index int)
- func (d *Context) SetGlobalObject()
- func (d *Context) SetMagic(index int, magic int)
- func (d *Context) SetPrototype(index int)
- func (d *Context) SetTop(index int)
- func (d *Context) StrictEquals(index1 int, index2 int) bool
- func (d *Context) Substring(index int, startCharOffset int, endCharOffset int)
- func (d *Context) Swap(index1 int, index2 int)
- func (d *Context) SwapTop(index int)
- func (d *Context) Throw()
- func (d *Context) ToBoolean(index int) bool
- func (d *Context) ToBuffer(index int) (rawPtr unsafe.Pointer, outSize uint)
- func (d *Context) ToDefaultvalue(index int, hint int)
- func (d *Context) ToDynamicBuffer(index int) (rawPtr unsafe.Pointer, outSize uint)
- func (d *Context) ToFixedBuffer(index int) (rawPtr unsafe.Pointer, outSize uint)
- func (d *Context) ToInt(index int) int
- func (d *Context) ToInt32(index int) int32
- func (d *Context) ToLstring(index int) string
- func (d *Context) ToNull(index int)
- func (d *Context) ToNumber(index int) float64
- func (d *Context) ToObject(index int)
- func (d *Context) ToPointer(index int) unsafe.Pointer
- func (d *Context) ToPrimitive(index int, hint int)
- func (d *Context) ToString(index int) string
- func (d *Context) ToUint(index int) uint
- func (d *Context) ToUint16(index int) uint16
- func (d *Context) ToUint32(index int) uint32
- func (d *Context) ToUndefined(index int)
- func (d *Context) Trim(index int)
- func (d *Context) XcopyTop(fromCtx *Context, count int)
- func (d *Context) XmoveTop(fromCtx *Context, count int)
- type Error
- type Flags
- type Type
- func (t Type) IsBool() bool
- func (t Type) IsBuffer() bool
- func (t Type) IsLightFunc() bool
- func (t Type) IsNone() bool
- func (t Type) IsNull() bool
- func (t Type) IsNumber() bool
- func (t Type) IsObject() bool
- func (t Type) IsPointer() bool
- func (t Type) IsString() bool
- func (t Type) IsUndefined() bool
- func (t Type) String() string
Constants ¶
const ( CompileEval uint = C.DUK_COMPILE_EVAL CompileFunction uint = C.DUK_COMPILE_FUNCTION CompileStrict uint = C.DUK_COMPILE_STRICT CompileShebang uint = C.DUK_COMPILE_SHEBANG CompileSafe uint = C.DUK_COMPILE_SAFE CompileNoResult uint = C.DUK_COMPILE_NORESULT CompileNoSource uint = C.DUK_COMPILE_NOSOURCE CompileStrlen uint = C.DUK_COMPILE_STRLEN CompileNoFileName uint = C.DUK_COMPILE_NOFILENAME CompileFuncExpr uint = C.DUK_COMPILE_FUNCEXPR )
const ( TypeMaskNone uint = C.DUK_TYPE_MASK_NONE TypeMaskUndefined uint = C.DUK_TYPE_MASK_UNDEFINED TypeMaskNull uint = C.DUK_TYPE_MASK_NULL TypeMaskBoolean uint = C.DUK_TYPE_MASK_BOOLEAN TypeMaskNumber uint = C.DUK_TYPE_MASK_NUMBER TypeMaskString uint = C.DUK_TYPE_MASK_STRING TypeMaskObject uint = C.DUK_TYPE_MASK_OBJECT TypeMaskBuffer uint = C.DUK_TYPE_MASK_BUFFER TypeMaskPointer uint = C.DUK_TYPE_MASK_POINTER TypeMaskLightFunc uint = C.DUK_TYPE_MASK_LIGHTFUNC )
const ( EnumIncludeNonenumerable uint = C.DUK_ENUM_INCLUDE_NONENUMERABLE EnumIncludeHidden uint = C.DUK_ENUM_INCLUDE_HIDDEN EnumIncludeSymbols uint = C.DUK_ENUM_INCLUDE_SYMBOLS EnumExcludeStrings uint = C.DUK_ENUM_EXCLUDE_STRINGS EnumOwnPropertiesOnly uint = C.DUK_ENUM_OWN_PROPERTIES_ONLY EnumArrayIndicesOnly uint = C.DUK_ENUM_ARRAY_INDICES_ONLY EnumSortArrayIndices uint = C.DUK_ENUM_SORT_ARRAY_INDICES NoProxyBehavior uint = C.DUK_ENUM_NO_PROXY_BEHAVIOR )
const ( ErrUnimplemented int = 50 + iota ErrUnsupported ErrNone int = C.DUK_ERR_NONE ErrError int = C.DUK_ERR_ERROR ErrEval int = C.DUK_ERR_EVAL_ERROR ErrRange int = C.DUK_ERR_RANGE_ERROR ErrReference int = C.DUK_ERR_REFERENCE_ERROR ErrSyntax int = C.DUK_ERR_SYNTAX_ERROR ErrType int = C.DUK_ERR_TYPE_ERROR ErrURI int = C.DUK_ERR_URI_ERROR )
const ( // Returned error values ErrRetUnimplemented int = -(ErrUnimplemented + iota) ErrRetUnsupported ErrRetInternal ErrRetAlloc ErrRetAssertion ErrRetAPI ErrRetUncaughtError )
const ( ErrRetError int = -(ErrError) ErrRetEval int = -(ErrEval) ErrRetRange int = -(ErrRange) ErrRetReference int = -(ErrReference) ErrRetSyntax int = -(ErrSyntax) ErrRetType int = -(ErrType) ErrRetURI int = -(ErrURI) )
const ( ExecSuccess int = C.DUK_EXEC_SUCCESS ExecError int = C.DUK_EXEC_ERROR )
const ( LogTrace int = iota LogDebug LogInfo LogWarn LogError LogFatal )
const ( BufObjArrayBuffer int = C.DUK_BUFOBJ_ARRAYBUFFER BufObjNodejsBuffer int = C.DUK_BUFOBJ_NODEJS_BUFFER BufObjDataView int = C.DUK_BUFOBJ_DATAVIEW BufobjInt8Array int = C.DUK_BUFOBJ_INT8ARRAY BufobjUint8Array int = C.DUK_BUFOBJ_UINT8ARRAY BufobjUint8ClampedArray int = C.DUK_BUFOBJ_UINT8CLAMPEDARRAY BufObjInt16Array int = C.DUK_BUFOBJ_INT16ARRAY BufObjUint16Array int = C.DUK_BUFOBJ_UINT16ARRAY BufObjInt32Array int = C.DUK_BUFOBJ_INT32ARRAY BufObjUint32Array int = C.DUK_BUFOBJ_UINT32ARRAY BufObjFloat32Array int = C.DUK_BUFOBJ_FLOAT32ARRAY BufObjFloat64Array int = C.DUK_BUFOBJ_FLOAT64ARRAY )
const FlagConsoleFlush = 1 << 1
FlagConsoleFlush is a Console flag. Flush output after every call.
const FlagConsoleProxyWrapper = 1 << 0
FlagConsoleProxyWrapper is a Console flag. Use a proxy wrapper to make undefined methods (console.foo()) no-ops.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Context
New returns plain initialized duktape context object See: http://duktape.org/api.html#duk_create_heap_default
func NewWithFlags ¶
NewWithFlags returns plain initialized duktape context object You can control the behaviour of duktape by setting flags. See: http://duktape.org/api.html#duk_create_heap_default
func (*Context) Base64Decode ¶
func (*Context) Base64Encode ¶
func (*Context) CallMethod ¶
func (*Context) CheckStack ¶
func (*Context) CheckStackTop ¶
func (*Context) CheckTypeMask ¶
func (*Context) CompileFile ¶
func (*Context) CompileLstring ¶
func (*Context) CompileLstringFilename ¶
See: http://duktape.org/api.html#duk_compile_lstring_filename
func (*Context) CompileString ¶
func (*Context) CompileStringFilename ¶
See: http://duktape.org/api.html#duk_compile_string_filename
func (*Context) ConfigBuffer ¶
func (*Context) DebuggerAttach ¶
func (d *Context) DebuggerAttach( readFn, writeFn, peekFn, readFlushFn, writeFlushFn, detachedFn *[0]byte, uData unsafe.Pointer)
---[ Duktape 1.3 API ]--- // See: http://duktape.org/api.html#duk_debugger_attach
func (*Context) DebuggerCooperate ¶
func (d *Context) DebuggerCooperate()
func (*Context) DebuggerDetach ¶
func (d *Context) DebuggerDetach()
func (*Context) DelPropIndex ¶
func (*Context) DelPropString ¶
func (*Context) Destroy ¶
func (d *Context) Destroy()
Destroy destroy all the references to the functions and freed the pointers
func (*Context) DestroyHeap ¶
func (d *Context) DestroyHeap()
func (*Context) DumpContextStderr ¶
func (d *Context) DumpContextStderr()
func (*Context) DumpContextStdout ¶
func (d *Context) DumpContextStdout()
func (*Context) DumpFunction ¶
func (d *Context) DumpFunction()
func (*Context) Error ¶
Error pushes a new Error object to the stack and throws it. This will call fmt.Sprint, forwarding arguments after the error code, to produce the Error's message.
func (*Context) Errorf ¶
Errorf pushes a new Error object to the stack and throws it. This will call fmt.Sprintf, forwarding the format string and additional arguments, to produce the Error's message.
func (*Context) EvalFileNoresult ¶
func (*Context) EvalLstring ¶
func (*Context) EvalLstringNoresult ¶
func (*Context) EvalNoresult ¶
func (d *Context) EvalNoresult()
func (*Context) EvalString ¶
func (*Context) EvalStringNoresult ¶
func (*Context) FlushTimers ¶
func (d *Context) FlushTimers()
func (*Context) GetBoolean ¶
func (*Context) GetContext ¶
func (*Context) GetCurrentMagic ¶
func (*Context) GetErrorCode ¶
func (*Context) GetFinalizer ¶
func (*Context) GetGlobalString ¶
func (*Context) GetHeapptr ¶
func (*Context) GetLstring ¶
func (*Context) GetPointer ¶
func (*Context) GetPropIndex ¶
func (*Context) GetPropString ¶
func (*Context) GetPrototype ¶
func (*Context) GetTopIndex ¶
func (*Context) GetTypeMask ¶
func (*Context) HasPropIndex ¶
func (*Context) HasPropString ¶
func (*Context) Instanceof ¶
func (*Context) IsBoundFunction ¶
func (*Context) IsCFunction ¶
func (*Context) IsCallable ¶
func (*Context) IsConstructorCall ¶
func (*Context) IsDynamicBuffer ¶
func (*Context) IsEcmascriptFunction ¶
func (*Context) IsFixedBuffer ¶
func (*Context) IsFunction ¶
func (*Context) IsLightfunc ¶
func (*Context) IsNullOrUndefined ¶
func (*Context) IsObjectCoercible ¶
func (*Context) IsPrimitive ¶
func (*Context) IsStrictCall ¶
func (*Context) IsUndefined ¶
func (*Context) IsValidIndex ¶
func (*Context) JsonDecode ¶
func (*Context) JsonEncode ¶
func (*Context) LoadFunction ¶
func (d *Context) LoadFunction()
func (*Context) Must ¶
Must returns existing *Context or throw panic. It is highly recommended to use Must all the time.
func (*Context) NormalizeIndex ¶
func (*Context) PcallMethod ¶
func (*Context) PcompileFile ¶
func (*Context) PcompileLstring ¶
func (*Context) PcompileLstringFilename ¶
See: http://duktape.org/api.html#duk_pcompile_lstring_filename
func (*Context) PcompileString ¶
func (*Context) PcompileStringFilename ¶
See: http://duktape.org/api.html#duk_pcompile_string_filename
func (*Context) PevalFileNoresult ¶
func (*Context) PevalLstring ¶
func (*Context) PevalLstringNoresult ¶
func (*Context) PevalNoresult ¶
func (*Context) PevalString ¶
func (*Context) PevalStringNoresult ¶
func (*Context) PushBoolean ¶
func (*Context) PushBuffer ¶
func (*Context) PushBufferObject ¶
func (*Context) PushCFunction ¶
func (*Context) PushCLightfunc ¶
func (*Context) PushContextDump ¶
func (d *Context) PushContextDump()
func (*Context) PushCurrentFunction ¶
func (d *Context) PushCurrentFunction()
func (*Context) PushCurrentThread ¶
func (d *Context) PushCurrentThread()
func (*Context) PushDynamicBuffer ¶
func (*Context) PushErrorObject ¶
func (*Context) PushErrorObjectVa ¶
func (*Context) PushExternalBuffer ¶
func (d *Context) PushExternalBuffer()
func (*Context) PushFixedBuffer ¶
func (*Context) PushGlobalGoFunction ¶
PushGlobalGoFunction push the given function into duktape global object Returns non-negative index (relative to stack bottom) of the pushed function also returns error if the function name is invalid
func (*Context) PushGlobalObject ¶
func (d *Context) PushGlobalObject()
func (*Context) PushGlobalStash ¶
func (d *Context) PushGlobalStash()
func (*Context) PushGoFunction ¶
PushGoFunction push the given function into duktape stack, returns non-negative index (relative to stack bottom) of the pushed function
func (*Context) PushHeapStash ¶
func (d *Context) PushHeapStash()
func (*Context) PushHeapptr ¶
func (*Context) PushLstring ¶
func (*Context) PushNumber ¶
func (*Context) PushObject ¶
func (*Context) PushPointer ¶
func (*Context) PushString ¶
func (*Context) PushStringFile ¶
func (*Context) PushThread ¶
func (*Context) PushThreadNewGlobalenv ¶
See: http://duktape.org/api.html#duk_push_thread_new_globalenv
func (*Context) PushThreadStash ¶
func (*Context) PushTimers ¶
DefineTimers defines `setTimeout`, `clearTimeout`, `setInterval`, `clearInterval` into global context.
func (*Context) PushUndefined ¶
func (d *Context) PushUndefined()
func (*Context) PutGlobalString ¶
func (*Context) PutPropIndex ¶
func (*Context) PutPropString ¶
func (*Context) RequireBoolean ¶
func (*Context) RequireBuffer ¶
func (*Context) RequireCallable ¶
func (*Context) RequireContext ¶
func (*Context) RequireFunction ¶
func (*Context) RequireHeapptr ¶
func (*Context) RequireInt ¶
func (*Context) RequireLstring ¶
func (*Context) RequireNormalizeIndex ¶
See: http://duktape.org/api.html#duk_require_normalize_index
func (*Context) RequireNull ¶
func (*Context) RequireNumber ¶
func (*Context) RequireObjectCoercible ¶
See: http://duktape.org/api.html#duk_require_object_coercible
func (*Context) RequirePointer ¶
func (*Context) RequireStack ¶
func (*Context) RequireStackTop ¶
func (*Context) RequireString ¶
func (*Context) RequireTopIndex ¶
func (*Context) RequireTypeMask ¶
func (*Context) RequireUint ¶
func (*Context) RequireUndefined ¶
func (*Context) RequireValidIndex ¶
func (*Context) ResizeBuffer ¶
func (*Context) SafeToLstring ¶
func (*Context) SafeToString ¶
func (*Context) SetFinalizer ¶
func (*Context) SetGlobalObject ¶
func (d *Context) SetGlobalObject()
func (*Context) SetPrototype ¶
func (*Context) ToDefaultvalue ¶
func (*Context) ToDynamicBuffer ¶
func (*Context) ToFixedBuffer ¶
func (*Context) ToPrimitive ¶
func (*Context) ToUndefined ¶
type Type ¶
type Type uint
const ( TypeNone Type = C.DUK_TYPE_NONE TypeUndefined Type = C.DUK_TYPE_UNDEFINED TypeNull Type = C.DUK_TYPE_NULL TypeBoolean Type = C.DUK_TYPE_BOOLEAN TypeNumber Type = C.DUK_TYPE_NUMBER TypeString Type = C.DUK_TYPE_STRING TypeObject Type = C.DUK_TYPE_OBJECT TypeBuffer Type = C.DUK_TYPE_BUFFER TypePointer Type = C.DUK_TYPE_POINTER TypeLightFunc Type = C.DUK_TYPE_LIGHTFUNC )