Exemplo n.º 1
0
func (engine_ *Engine) NewObjectTemplate() *ObjectTemplate {
	self_ := C.V8_NewObjectTemplate(engine_.self)

	if self_ == nil {
		return nil
	}

	//TODO::
	otmp_ := &ObjectTemplate{
		//id:         e.objectTemplateId + 1,
		engine: engine_,
		//accessors:  make(map[string]*accessorInfo),
		//properties: make(map[string]*propertyInfo),
		self: self_,
	}
	//e.objectTemplateId += 1
	//e.objectTemplates[ot.id] = ot
	return otmp_
}
Exemplo n.º 2
0
func (e *Engine) NewObjectTemplate() *ObjectTemplate {
	self := C.V8_NewObjectTemplate(e.self)

	return newObjectTemplate(e, self)
}