id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
125,800
wirepair/gcd
gcdapi/emulation.go
SetScriptExecutionDisabledWithParams
func (c *Emulation) SetScriptExecutionDisabledWithParams(v *EmulationSetScriptExecutionDisabledParams) (*gcdmessage.ChromeResponse, error) { return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setScriptExecutionDisabled", Params: v}) }
go
func (c *Emulation) SetScriptExecutionDisabledWithParams(v *EmulationSetScriptExecutionDisabledParams) (*gcdmessage.ChromeResponse, error) { return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setScriptExecutionDisabled", Params: v}) }
[ "func", "(", "c", "*", "Emulation", ")", "SetScriptExecutionDisabledWithParams", "(", "v", "*", "EmulationSetScriptExecutionDisabledParams", ")", "(", "*", "gcdmessage", ".", "ChromeResponse", ",", "error", ")", "{", "return", "gcdmessage", ".", "SendDefaultRequest", ...
// SetScriptExecutionDisabledWithParams - Switches script execution in the page.
[ "SetScriptExecutionDisabledWithParams", "-", "Switches", "script", "execution", "in", "the", "page", "." ]
2f7807e117ff2d25c3c702d6eef0155ba9d1a556
https://github.com/wirepair/gcd/blob/2f7807e117ff2d25c3c702d6eef0155ba9d1a556/gcdapi/emulation.go#L334-L336
125,801
wirepair/gcd
gcdapi/emulation.go
SetScriptExecutionDisabled
func (c *Emulation) SetScriptExecutionDisabled(value bool) (*gcdmessage.ChromeResponse, error) { var v EmulationSetScriptExecutionDisabledParams v.Value = value return c.SetScriptExecutionDisabledWithParams(&v) }
go
func (c *Emulation) SetScriptExecutionDisabled(value bool) (*gcdmessage.ChromeResponse, error) { var v EmulationSetScriptExecutionDisabledParams v.Value = value return c.SetScriptExecutionDisabledWithParams(&v) }
[ "func", "(", "c", "*", "Emulation", ")", "SetScriptExecutionDisabled", "(", "value", "bool", ")", "(", "*", "gcdmessage", ".", "ChromeResponse", ",", "error", ")", "{", "var", "v", "EmulationSetScriptExecutionDisabledParams", "\n", "v", ".", "Value", "=", "val...
// SetScriptExecutionDisabled - Switches script execution in the page. // value - Whether script execution should be disabled in the page.
[ "SetScriptExecutionDisabled", "-", "Switches", "script", "execution", "in", "the", "page", ".", "value", "-", "Whether", "script", "execution", "should", "be", "disabled", "in", "the", "page", "." ]
2f7807e117ff2d25c3c702d6eef0155ba9d1a556
https://github.com/wirepair/gcd/blob/2f7807e117ff2d25c3c702d6eef0155ba9d1a556/gcdapi/emulation.go#L340-L344
125,802
wirepair/gcd
gcdapi/emulation.go
SetTouchEmulationEnabledWithParams
func (c *Emulation) SetTouchEmulationEnabledWithParams(v *EmulationSetTouchEmulationEnabledParams) (*gcdmessage.ChromeResponse, error) { return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setTouchEmulationEnabled", Params: v}) }
go
func (c *Emulation) SetTouchEmulationEnabledWithParams(v *EmulationSetTouchEmulationEnabledParams) (*gcdmessage.ChromeResponse, error) { return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Emulation.setTouchEmulationEnabled", Params: v}) }
[ "func", "(", "c", "*", "Emulation", ")", "SetTouchEmulationEnabledWithParams", "(", "v", "*", "EmulationSetTouchEmulationEnabledParams", ")", "(", "*", "gcdmessage", ".", "ChromeResponse", ",", "error", ")", "{", "return", "gcdmessage", ".", "SendDefaultRequest", "(...
// SetTouchEmulationEnabledWithParams - Enables touch on platforms which do not support them.
[ "SetTouchEmulationEnabledWithParams", "-", "Enables", "touch", "on", "platforms", "which", "do", "not", "support", "them", "." ]
2f7807e117ff2d25c3c702d6eef0155ba9d1a556
https://github.com/wirepair/gcd/blob/2f7807e117ff2d25c3c702d6eef0155ba9d1a556/gcdapi/emulation.go#L354-L356
125,803
wirepair/gcd
gcdapi/emulation.go
SetTouchEmulationEnabled
func (c *Emulation) SetTouchEmulationEnabled(enabled bool, maxTouchPoints int) (*gcdmessage.ChromeResponse, error) { var v EmulationSetTouchEmulationEnabledParams v.Enabled = enabled v.MaxTouchPoints = maxTouchPoints return c.SetTouchEmulationEnabledWithParams(&v) }
go
func (c *Emulation) SetTouchEmulationEnabled(enabled bool, maxTouchPoints int) (*gcdmessage.ChromeResponse, error) { var v EmulationSetTouchEmulationEnabledParams v.Enabled = enabled v.MaxTouchPoints = maxTouchPoints return c.SetTouchEmulationEnabledWithParams(&v) }
[ "func", "(", "c", "*", "Emulation", ")", "SetTouchEmulationEnabled", "(", "enabled", "bool", ",", "maxTouchPoints", "int", ")", "(", "*", "gcdmessage", ".", "ChromeResponse", ",", "error", ")", "{", "var", "v", "EmulationSetTouchEmulationEnabledParams", "\n", "v...
// SetTouchEmulationEnabled - Enables touch on platforms which do not support them. // enabled - Whether the touch event emulation should be enabled. // maxTouchPoints - Maximum touch points supported. Defaults to one.
[ "SetTouchEmulationEnabled", "-", "Enables", "touch", "on", "platforms", "which", "do", "not", "support", "them", ".", "enabled", "-", "Whether", "the", "touch", "event", "emulation", "should", "be", "enabled", ".", "maxTouchPoints", "-", "Maximum", "touch", "poi...
2f7807e117ff2d25c3c702d6eef0155ba9d1a556
https://github.com/wirepair/gcd/blob/2f7807e117ff2d25c3c702d6eef0155ba9d1a556/gcdapi/emulation.go#L361-L366
125,804
wirepair/gcd
gcdapi/audits.go
GetEncodedResponseWithParams
func (c *Audits) GetEncodedResponseWithParams(v *AuditsGetEncodedResponseParams) (string, int, int, error) { resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Audits.getEncodedResponse", Params: v}) if err != nil { return "", 0, 0, err ...
go
func (c *Audits) GetEncodedResponseWithParams(v *AuditsGetEncodedResponseParams) (string, int, int, error) { resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Audits.getEncodedResponse", Params: v}) if err != nil { return "", 0, 0, err ...
[ "func", "(", "c", "*", "Audits", ")", "GetEncodedResponseWithParams", "(", "v", "*", "AuditsGetEncodedResponseParams", ")", "(", "string", ",", "int", ",", "int", ",", "error", ")", "{", "resp", ",", "err", ":=", "gcdmessage", ".", "SendCustomReturn", "(", ...
// GetEncodedResponseWithParams - Returns the response body and size if it were re-encoded with the specified settings. Only applies to images. // Returns - body - The encoded body as a base64 string. Omitted if sizeOnly is true. originalSize - Size before re-encoding. encodedSize - Size after re-encoding.
[ "GetEncodedResponseWithParams", "-", "Returns", "the", "response", "body", "and", "size", "if", "it", "were", "re", "-", "encoded", "with", "the", "specified", "settings", ".", "Only", "applies", "to", "images", ".", "Returns", "-", "body", "-", "The", "enco...
2f7807e117ff2d25c3c702d6eef0155ba9d1a556
https://github.com/wirepair/gcd/blob/2f7807e117ff2d25c3c702d6eef0155ba9d1a556/gcdapi/audits.go#L34-L64
125,805
wirepair/gcd
gcdapigen/type_properties.go
IsNonPropertiesObject
func (p *TypeProperties) IsNonPropertiesObject() bool { return (p.UnderlyingType == "object" && len(p.protoProperty.Properties) == 0) }
go
func (p *TypeProperties) IsNonPropertiesObject() bool { return (p.UnderlyingType == "object" && len(p.protoProperty.Properties) == 0) }
[ "func", "(", "p", "*", "TypeProperties", ")", "IsNonPropertiesObject", "(", ")", "bool", "{", "return", "(", "p", ".", "UnderlyingType", "==", "\"", "\"", "&&", "len", "(", "p", ".", "protoProperty", ".", "Properties", ")", "==", "0", ")", "\n", "}" ]
// SharedProperties interface methods
[ "SharedProperties", "interface", "methods" ]
2f7807e117ff2d25c3c702d6eef0155ba9d1a556
https://github.com/wirepair/gcd/blob/2f7807e117ff2d25c3c702d6eef0155ba9d1a556/gcdapigen/type_properties.go#L101-L103
125,806
huandu/skiplist
element.go
NextLevel
func (element *Element) NextLevel(level int) *Element { if level >= len(element.next) || level < 0 { panic("invalid argument to NextLevel") } return element.next[level] }
go
func (element *Element) NextLevel(level int) *Element { if level >= len(element.next) || level < 0 { panic("invalid argument to NextLevel") } return element.next[level] }
[ "func", "(", "element", "*", "Element", ")", "NextLevel", "(", "level", "int", ")", "*", "Element", "{", "if", "level", ">=", "len", "(", "element", ".", "next", ")", "||", "level", "<", "0", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n",...
// Gets next element at a specific level.
[ "Gets", "next", "element", "at", "a", "specific", "level", "." ]
8e883b265e1b2e8f7f9f22cceef40d624d5ef315
https://github.com/huandu/skiplist/blob/8e883b265e1b2e8f7f9f22cceef40d624d5ef315/element.go#L16-L22
125,807
huandu/skiplist
skiplist.go
Init
func (list *SkipList) Init() *SkipList { list.next = make([]*Element, list.level) list.length = 0 return list }
go
func (list *SkipList) Init() *SkipList { list.next = make([]*Element, list.level) list.length = 0 return list }
[ "func", "(", "list", "*", "SkipList", ")", "Init", "(", ")", "*", "SkipList", "{", "list", ".", "next", "=", "make", "(", "[", "]", "*", "Element", ",", "list", ".", "level", ")", "\n", "list", ".", "length", "=", "0", "\n", "return", "list", "...
// Resets a skiplist and discards all exists elements.
[ "Resets", "a", "skiplist", "and", "discards", "all", "exists", "elements", "." ]
8e883b265e1b2e8f7f9f22cceef40d624d5ef315
https://github.com/huandu/skiplist/blob/8e883b265e1b2e8f7f9f22cceef40d624d5ef315/skiplist.go#L118-L122
125,808
huandu/skiplist
skiplist.go
Set
func (list *SkipList) Set(key, value interface{}) *Element { var element *Element score := getScore(key, list.reversed) prevs := list.getPrevElementNodes(key, score) // found an element with the same key, replace its value if element = prevs[0].next[0]; element != nil && !list.keyFunc.Compare(element.key, key) {...
go
func (list *SkipList) Set(key, value interface{}) *Element { var element *Element score := getScore(key, list.reversed) prevs := list.getPrevElementNodes(key, score) // found an element with the same key, replace its value if element = prevs[0].next[0]; element != nil && !list.keyFunc.Compare(element.key, key) {...
[ "func", "(", "list", "*", "SkipList", ")", "Set", "(", "key", ",", "value", "interface", "{", "}", ")", "*", "Element", "{", "var", "element", "*", "Element", "\n\n", "score", ":=", "getScore", "(", "key", ",", "list", ".", "reversed", ")", "\n", "...
// Sets a value in the list with key. // If the key exists, change element value to the new one. // Returns new element pointer.
[ "Sets", "a", "value", "in", "the", "list", "with", "key", ".", "If", "the", "key", "exists", "change", "element", "value", "to", "the", "new", "one", ".", "Returns", "new", "element", "pointer", "." ]
8e883b265e1b2e8f7f9f22cceef40d624d5ef315
https://github.com/huandu/skiplist/blob/8e883b265e1b2e8f7f9f22cceef40d624d5ef315/skiplist.go#L146-L174
125,809
huandu/skiplist
skiplist.go
Get
func (list *SkipList) Get(key interface{}) *Element { var prev *elementNode = &list.elementNode var next *Element score := getScore(key, list.reversed) for i := list.level - 1; i >= 0; i-- { next = prev.next[i] for next != nil && (score > next.score || (score == next.score && list.keyFunc.Compare(key, next...
go
func (list *SkipList) Get(key interface{}) *Element { var prev *elementNode = &list.elementNode var next *Element score := getScore(key, list.reversed) for i := list.level - 1; i >= 0; i-- { next = prev.next[i] for next != nil && (score > next.score || (score == next.score && list.keyFunc.Compare(key, next...
[ "func", "(", "list", "*", "SkipList", ")", "Get", "(", "key", "interface", "{", "}", ")", "*", "Element", "{", "var", "prev", "*", "elementNode", "=", "&", "list", ".", "elementNode", "\n", "var", "next", "*", "Element", "\n", "score", ":=", "getScor...
// Gets an element. // Returns element pointer if found, nil if not found.
[ "Gets", "an", "element", ".", "Returns", "element", "pointer", "if", "found", "nil", "if", "not", "found", "." ]
8e883b265e1b2e8f7f9f22cceef40d624d5ef315
https://github.com/huandu/skiplist/blob/8e883b265e1b2e8f7f9f22cceef40d624d5ef315/skiplist.go#L178-L198
125,810
huandu/skiplist
skiplist.go
MustGetValue
func (list *SkipList) MustGetValue(key interface{}) interface{} { element := list.Get(key) if element == nil { panic("cannot find key in skiplist") } return element.Value }
go
func (list *SkipList) MustGetValue(key interface{}) interface{} { element := list.Get(key) if element == nil { panic("cannot find key in skiplist") } return element.Value }
[ "func", "(", "list", "*", "SkipList", ")", "MustGetValue", "(", "key", "interface", "{", "}", ")", "interface", "{", "}", "{", "element", ":=", "list", ".", "Get", "(", "key", ")", "\n\n", "if", "element", "==", "nil", "{", "panic", "(", "\"", "\""...
// Gets a value. It will panic if key doesn't exist. // Returns value.
[ "Gets", "a", "value", ".", "It", "will", "panic", "if", "key", "doesn", "t", "exist", ".", "Returns", "value", "." ]
8e883b265e1b2e8f7f9f22cceef40d624d5ef315
https://github.com/huandu/skiplist/blob/8e883b265e1b2e8f7f9f22cceef40d624d5ef315/skiplist.go#L214-L222
125,811
huandu/skiplist
skiplist.go
Remove
func (list *SkipList) Remove(key interface{}) *Element { score := getScore(key, list.reversed) prevs := list.getPrevElementNodes(key, score) // found the element, remove it if element := prevs[0].next[0]; element != nil && !list.keyFunc.Compare(element.key, key) { for k, v := range element.next { prevs[k].nex...
go
func (list *SkipList) Remove(key interface{}) *Element { score := getScore(key, list.reversed) prevs := list.getPrevElementNodes(key, score) // found the element, remove it if element := prevs[0].next[0]; element != nil && !list.keyFunc.Compare(element.key, key) { for k, v := range element.next { prevs[k].nex...
[ "func", "(", "list", "*", "SkipList", ")", "Remove", "(", "key", "interface", "{", "}", ")", "*", "Element", "{", "score", ":=", "getScore", "(", "key", ",", "list", ".", "reversed", ")", "\n", "prevs", ":=", "list", ".", "getPrevElementNodes", "(", ...
// Removes an element. // Returns removed element pointer if found, nil if not found.
[ "Removes", "an", "element", ".", "Returns", "removed", "element", "pointer", "if", "found", "nil", "if", "not", "found", "." ]
8e883b265e1b2e8f7f9f22cceef40d624d5ef315
https://github.com/huandu/skiplist/blob/8e883b265e1b2e8f7f9f22cceef40d624d5ef315/skiplist.go#L226-L241
125,812
huandu/skiplist
skiplist.go
SetMaxLevel
func (list *SkipList) SetMaxLevel(level int) (old int) { if level <= 0 { panic("invalid argument to SetLevel") } old, list.level = list.level, level if old == level { return } if old > level { list.next = list.next[:level] list.prevNodesCache = list.prevNodesCache[:level] return } next := make([]*...
go
func (list *SkipList) SetMaxLevel(level int) (old int) { if level <= 0 { panic("invalid argument to SetLevel") } old, list.level = list.level, level if old == level { return } if old > level { list.next = list.next[:level] list.prevNodesCache = list.prevNodesCache[:level] return } next := make([]*...
[ "func", "(", "list", "*", "SkipList", ")", "SetMaxLevel", "(", "level", "int", ")", "(", "old", "int", ")", "{", "if", "level", "<=", "0", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "old", ",", "list", ".", "level", "=", "list", "."...
// Changes skip list max level. // If level is not greater than 0, just panic.
[ "Changes", "skip", "list", "max", "level", ".", "If", "level", "is", "not", "greater", "than", "0", "just", "panic", "." ]
8e883b265e1b2e8f7f9f22cceef40d624d5ef315
https://github.com/huandu/skiplist/blob/8e883b265e1b2e8f7f9f22cceef40d624d5ef315/skiplist.go#L271-L294
125,813
gopherjs/webgl
webgl.go
NewContext
func NewContext(canvas *js.Object, ca *ContextAttributes) (*Context, error) { if js.Global.Get("WebGLRenderingContext") == js.Undefined { return nil, errors.New("Your browser doesn't appear to support webgl.") } if ca == nil { ca = DefaultAttributes() } attrs := map[string]bool{ "alpha": ca...
go
func NewContext(canvas *js.Object, ca *ContextAttributes) (*Context, error) { if js.Global.Get("WebGLRenderingContext") == js.Undefined { return nil, errors.New("Your browser doesn't appear to support webgl.") } if ca == nil { ca = DefaultAttributes() } attrs := map[string]bool{ "alpha": ca...
[ "func", "NewContext", "(", "canvas", "*", "js", ".", "Object", ",", "ca", "*", "ContextAttributes", ")", "(", "*", "Context", ",", "error", ")", "{", "if", "js", ".", "Global", ".", "Get", "(", "\"", "\"", ")", "==", "js", ".", "Undefined", "{", ...
// NewContext takes an HTML5 canvas object and optional context attributes. // If an error is returned it means you won't have access to WebGL // functionality.
[ "NewContext", "takes", "an", "HTML5", "canvas", "object", "and", "optional", "context", "attributes", ".", "If", "an", "error", "is", "returned", "it", "means", "you", "won", "t", "have", "access", "to", "WebGL", "functionality", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L343-L370
125,814
gopherjs/webgl
webgl.go
GetContextAttributes
func (c *Context) GetContextAttributes() ContextAttributes { ca := c.Call("getContextAttributes") return ContextAttributes{ ca.Get("alpha").Bool(), ca.Get("depth").Bool(), ca.Get("stencil").Bool(), ca.Get("antialias").Bool(), ca.Get("premultipliedAlpha").Bool(), ca.Get("preservedDrawingBuffer").Bool(), }...
go
func (c *Context) GetContextAttributes() ContextAttributes { ca := c.Call("getContextAttributes") return ContextAttributes{ ca.Get("alpha").Bool(), ca.Get("depth").Bool(), ca.Get("stencil").Bool(), ca.Get("antialias").Bool(), ca.Get("premultipliedAlpha").Bool(), ca.Get("preservedDrawingBuffer").Bool(), }...
[ "func", "(", "c", "*", "Context", ")", "GetContextAttributes", "(", ")", "ContextAttributes", "{", "ca", ":=", "c", ".", "Call", "(", "\"", "\"", ")", "\n", "return", "ContextAttributes", "{", "ca", ".", "Get", "(", "\"", "\"", ")", ".", "Bool", "(",...
// Returns the context attributes active on the context. These values might // be different than what was requested on context creation if the // browser's implementation doesn't support a feature.
[ "Returns", "the", "context", "attributes", "active", "on", "the", "context", ".", "These", "values", "might", "be", "different", "than", "what", "was", "requested", "on", "context", "creation", "if", "the", "browser", "s", "implementation", "doesn", "t", "supp...
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L375-L385
125,815
gopherjs/webgl
webgl.go
AttachShader
func (c *Context) AttachShader(program *js.Object, shader *js.Object) { c.Call("attachShader", program, shader) }
go
func (c *Context) AttachShader(program *js.Object, shader *js.Object) { c.Call("attachShader", program, shader) }
[ "func", "(", "c", "*", "Context", ")", "AttachShader", "(", "program", "*", "js", ".", "Object", ",", "shader", "*", "js", ".", "Object", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "program", ",", "shader", ")", "\n", "}" ]
// Attaches a WebGLShader object to a WebGLProgram object.
[ "Attaches", "a", "WebGLShader", "object", "to", "a", "WebGLProgram", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L393-L395
125,816
gopherjs/webgl
webgl.go
BindAttribLocation
func (c *Context) BindAttribLocation(program *js.Object, index int, name string) { c.Call("bindAttribLocation", program, index, name) }
go
func (c *Context) BindAttribLocation(program *js.Object, index int, name string) { c.Call("bindAttribLocation", program, index, name) }
[ "func", "(", "c", "*", "Context", ")", "BindAttribLocation", "(", "program", "*", "js", ".", "Object", ",", "index", "int", ",", "name", "string", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "program", ",", "index", ",", "name", ")", "\n", ...
// Binds a generic vertex index to a user-defined attribute variable.
[ "Binds", "a", "generic", "vertex", "index", "to", "a", "user", "-", "defined", "attribute", "variable", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L398-L400
125,817
gopherjs/webgl
webgl.go
BindBuffer
func (c *Context) BindBuffer(target int, buffer *js.Object) { c.Call("bindBuffer", target, buffer) }
go
func (c *Context) BindBuffer(target int, buffer *js.Object) { c.Call("bindBuffer", target, buffer) }
[ "func", "(", "c", "*", "Context", ")", "BindBuffer", "(", "target", "int", ",", "buffer", "*", "js", ".", "Object", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "buffer", ")", "\n", "}" ]
// Associates a buffer with a buffer target.
[ "Associates", "a", "buffer", "with", "a", "buffer", "target", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L403-L405
125,818
gopherjs/webgl
webgl.go
BindFramebuffer
func (c *Context) BindFramebuffer(target int, framebuffer *js.Object) { c.Call("bindFramebuffer", target, framebuffer) }
go
func (c *Context) BindFramebuffer(target int, framebuffer *js.Object) { c.Call("bindFramebuffer", target, framebuffer) }
[ "func", "(", "c", "*", "Context", ")", "BindFramebuffer", "(", "target", "int", ",", "framebuffer", "*", "js", ".", "Object", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "framebuffer", ")", "\n", "}" ]
// Associates a WebGLFramebuffer object with the FRAMEBUFFER bind target.
[ "Associates", "a", "WebGLFramebuffer", "object", "with", "the", "FRAMEBUFFER", "bind", "target", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L408-L410
125,819
gopherjs/webgl
webgl.go
BindRenderbuffer
func (c *Context) BindRenderbuffer(target int, renderbuffer *js.Object) { c.Call("bindRenderbuffer", target, renderbuffer) }
go
func (c *Context) BindRenderbuffer(target int, renderbuffer *js.Object) { c.Call("bindRenderbuffer", target, renderbuffer) }
[ "func", "(", "c", "*", "Context", ")", "BindRenderbuffer", "(", "target", "int", ",", "renderbuffer", "*", "js", ".", "Object", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "renderbuffer", ")", "\n", "}" ]
// Binds a WebGLRenderbuffer object to be used for rendering.
[ "Binds", "a", "WebGLRenderbuffer", "object", "to", "be", "used", "for", "rendering", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L413-L415
125,820
gopherjs/webgl
webgl.go
BindTexture
func (c *Context) BindTexture(target int, texture *js.Object) { c.Call("bindTexture", target, texture) }
go
func (c *Context) BindTexture(target int, texture *js.Object) { c.Call("bindTexture", target, texture) }
[ "func", "(", "c", "*", "Context", ")", "BindTexture", "(", "target", "int", ",", "texture", "*", "js", ".", "Object", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "texture", ")", "\n", "}" ]
// Binds a named texture object to a target.
[ "Binds", "a", "named", "texture", "object", "to", "a", "target", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L418-L420
125,821
gopherjs/webgl
webgl.go
BlendColor
func (c *Context) BlendColor(r, g, b, a float64) { c.Call("blendColor", r, g, b, a) }
go
func (c *Context) BlendColor(r, g, b, a float64) { c.Call("blendColor", r, g, b, a) }
[ "func", "(", "c", "*", "Context", ")", "BlendColor", "(", "r", ",", "g", ",", "b", ",", "a", "float64", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "r", ",", "g", ",", "b", ",", "a", ")", "\n", "}" ]
// The GL_BLEND_COLOR may be used to calculate the source and destination blending factors.
[ "The", "GL_BLEND_COLOR", "may", "be", "used", "to", "calculate", "the", "source", "and", "destination", "blending", "factors", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L423-L425
125,822
gopherjs/webgl
webgl.go
BlendEquationSeparate
func (c *Context) BlendEquationSeparate(modeRGB, modeAlpha int) { c.Call("blendEquationSeparate", modeRGB, modeAlpha) }
go
func (c *Context) BlendEquationSeparate(modeRGB, modeAlpha int) { c.Call("blendEquationSeparate", modeRGB, modeAlpha) }
[ "func", "(", "c", "*", "Context", ")", "BlendEquationSeparate", "(", "modeRGB", ",", "modeAlpha", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "modeRGB", ",", "modeAlpha", ")", "\n", "}" ]
// Controls the blending of an incoming source fragment's R, G, B, and A values // with a destination R, G, B, and A values as stored in the fragment's WebGLFramebuffer.
[ "Controls", "the", "blending", "of", "an", "incoming", "source", "fragment", "s", "R", "G", "B", "and", "A", "values", "with", "a", "destination", "R", "G", "B", "and", "A", "values", "as", "stored", "in", "the", "fragment", "s", "WebGLFramebuffer", "." ...
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L435-L437
125,823
gopherjs/webgl
webgl.go
BlendFunc
func (c *Context) BlendFunc(sfactor, dfactor int) { c.Call("blendFunc", sfactor, dfactor) }
go
func (c *Context) BlendFunc(sfactor, dfactor int) { c.Call("blendFunc", sfactor, dfactor) }
[ "func", "(", "c", "*", "Context", ")", "BlendFunc", "(", "sfactor", ",", "dfactor", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "sfactor", ",", "dfactor", ")", "\n", "}" ]
// Sets the blending factors used to combine source and destination pixels.
[ "Sets", "the", "blending", "factors", "used", "to", "combine", "source", "and", "destination", "pixels", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L440-L442
125,824
gopherjs/webgl
webgl.go
BlendFuncSeparate
func (c *Context) BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha int) { c.Call("blendFuncSeparate", srcRGB, dstRGB, srcAlpha, dstAlpha) }
go
func (c *Context) BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha int) { c.Call("blendFuncSeparate", srcRGB, dstRGB, srcAlpha, dstAlpha) }
[ "func", "(", "c", "*", "Context", ")", "BlendFuncSeparate", "(", "srcRGB", ",", "dstRGB", ",", "srcAlpha", ",", "dstAlpha", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "srcRGB", ",", "dstRGB", ",", "srcAlpha", ",", "dstAlpha", ")", "\n",...
// Sets the weighting factors that are used by blendEquationSeparate.
[ "Sets", "the", "weighting", "factors", "that", "are", "used", "by", "blendEquationSeparate", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L445-L447
125,825
gopherjs/webgl
webgl.go
BufferData
func (c *Context) BufferData(target int, data interface{}, usage int) { c.Call("bufferData", target, data, usage) }
go
func (c *Context) BufferData(target int, data interface{}, usage int) { c.Call("bufferData", target, data, usage) }
[ "func", "(", "c", "*", "Context", ")", "BufferData", "(", "target", "int", ",", "data", "interface", "{", "}", ",", "usage", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "data", ",", "usage", ")", "\n", "}" ]
// Creates a buffer in memory and initializes it with array data. // If no array is provided, the contents of the buffer is initialized to 0.
[ "Creates", "a", "buffer", "in", "memory", "and", "initializes", "it", "with", "array", "data", ".", "If", "no", "array", "is", "provided", "the", "contents", "of", "the", "buffer", "is", "initialized", "to", "0", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L451-L453
125,826
gopherjs/webgl
webgl.go
BufferSubData
func (c *Context) BufferSubData(target int, offset int, data interface{}) { c.Call("bufferSubData", target, offset, data) }
go
func (c *Context) BufferSubData(target int, offset int, data interface{}) { c.Call("bufferSubData", target, offset, data) }
[ "func", "(", "c", "*", "Context", ")", "BufferSubData", "(", "target", "int", ",", "offset", "int", ",", "data", "interface", "{", "}", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "offset", ",", "data", ")", "\n", "}" ]
// Used to modify or update some or all of a data store for a bound buffer object.
[ "Used", "to", "modify", "or", "update", "some", "or", "all", "of", "a", "data", "store", "for", "a", "bound", "buffer", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L456-L458
125,827
gopherjs/webgl
webgl.go
CheckFramebufferStatus
func (c *Context) CheckFramebufferStatus(target int) int { return c.Call("checkFramebufferStatus", target).Int() }
go
func (c *Context) CheckFramebufferStatus(target int) int { return c.Call("checkFramebufferStatus", target).Int() }
[ "func", "(", "c", "*", "Context", ")", "CheckFramebufferStatus", "(", "target", "int", ")", "int", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "target", ")", ".", "Int", "(", ")", "\n", "}" ]
// Returns whether the currently bound WebGLFramebuffer is complete. // If not complete, returns the reason why.
[ "Returns", "whether", "the", "currently", "bound", "WebGLFramebuffer", "is", "complete", ".", "If", "not", "complete", "returns", "the", "reason", "why", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L462-L464
125,828
gopherjs/webgl
webgl.go
ClearColor
func (c *Context) ClearColor(r, g, b, a float32) { c.Call("clearColor", r, g, b, a) }
go
func (c *Context) ClearColor(r, g, b, a float32) { c.Call("clearColor", r, g, b, a) }
[ "func", "(", "c", "*", "Context", ")", "ClearColor", "(", "r", ",", "g", ",", "b", ",", "a", "float32", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "r", ",", "g", ",", "b", ",", "a", ")", "\n", "}" ]
// Specifies color values to use by the clear method to clear the color buffer.
[ "Specifies", "color", "values", "to", "use", "by", "the", "clear", "method", "to", "clear", "the", "color", "buffer", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L472-L474
125,829
gopherjs/webgl
webgl.go
ColorMask
func (c *Context) ColorMask(r, g, b, a bool) { c.Call("colorMask", r, g, b, a) }
go
func (c *Context) ColorMask(r, g, b, a bool) { c.Call("colorMask", r, g, b, a) }
[ "func", "(", "c", "*", "Context", ")", "ColorMask", "(", "r", ",", "g", ",", "b", ",", "a", "bool", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "r", ",", "g", ",", "b", ",", "a", ")", "\n", "}" ]
// Lets you set whether individual colors can be written when // drawing or rendering to a framebuffer.
[ "Lets", "you", "set", "whether", "individual", "colors", "can", "be", "written", "when", "drawing", "or", "rendering", "to", "a", "framebuffer", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L487-L489
125,830
gopherjs/webgl
webgl.go
CopyTexImage2D
func (c *Context) CopyTexImage2D(target, level, internal, x, y, w, h, border int) { c.Call("copyTexImage2D", target, level, internal, x, y, w, h, border) }
go
func (c *Context) CopyTexImage2D(target, level, internal, x, y, w, h, border int) { c.Call("copyTexImage2D", target, level, internal, x, y, w, h, border) }
[ "func", "(", "c", "*", "Context", ")", "CopyTexImage2D", "(", "target", ",", "level", ",", "internal", ",", "x", ",", "y", ",", "w", ",", "h", ",", "border", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "level", ",", ...
// Copies a rectangle of pixels from the current WebGLFramebuffer into a texture image.
[ "Copies", "a", "rectangle", "of", "pixels", "from", "the", "current", "WebGLFramebuffer", "into", "a", "texture", "image", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L497-L499
125,831
gopherjs/webgl
webgl.go
CopyTexSubImage2D
func (c *Context) CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, w, h int) { c.Call("copyTexSubImage2D", target, level, xoffset, yoffset, x, y, w, h) }
go
func (c *Context) CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, w, h int) { c.Call("copyTexSubImage2D", target, level, xoffset, yoffset, x, y, w, h) }
[ "func", "(", "c", "*", "Context", ")", "CopyTexSubImage2D", "(", "target", ",", "level", ",", "xoffset", ",", "yoffset", ",", "x", ",", "y", ",", "w", ",", "h", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "level", ",...
// Replaces a portion of an existing 2D texture image with data from the current framebuffer.
[ "Replaces", "a", "portion", "of", "an", "existing", "2D", "texture", "image", "with", "data", "from", "the", "current", "framebuffer", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L502-L504
125,832
gopherjs/webgl
webgl.go
CreateShader
func (c *Context) CreateShader(typ int) *js.Object { return c.Call("createShader", typ) }
go
func (c *Context) CreateShader(typ int) *js.Object { return c.Call("createShader", typ) }
[ "func", "(", "c", "*", "Context", ")", "CreateShader", "(", "typ", "int", ")", "*", "js", ".", "Object", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "typ", ")", "\n", "}" ]
// Returns an empty vertex or fragment shader object based on the type specified.
[ "Returns", "an", "empty", "vertex", "or", "fragment", "shader", "object", "based", "on", "the", "type", "specified", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L528-L530
125,833
gopherjs/webgl
webgl.go
DepthRange
func (c *Context) DepthRange(zNear, zFar float64) { c.Call("depthRange", zNear, zFar) }
go
func (c *Context) DepthRange(zNear, zFar float64) { c.Call("depthRange", zNear, zFar) }
[ "func", "(", "c", "*", "Context", ")", "DepthRange", "(", "zNear", ",", "zFar", "float64", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "zNear", ",", "zFar", ")", "\n", "}" ]
// Sets the depth range for normalized coordinates to canvas or viewport depth coordinates.
[ "Sets", "the", "depth", "range", "for", "normalized", "coordinates", "to", "canvas", "or", "viewport", "depth", "coordinates", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L591-L593
125,834
gopherjs/webgl
webgl.go
DetachShader
func (c *Context) DetachShader(program, shader *js.Object) { c.Call("detachShader", program, shader) }
go
func (c *Context) DetachShader(program, shader *js.Object) { c.Call("detachShader", program, shader) }
[ "func", "(", "c", "*", "Context", ")", "DetachShader", "(", "program", ",", "shader", "*", "js", ".", "Object", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "program", ",", "shader", ")", "\n", "}" ]
// Detach a shader object from a program object.
[ "Detach", "a", "shader", "object", "from", "a", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L596-L598
125,835
gopherjs/webgl
webgl.go
DrawArrays
func (c *Context) DrawArrays(mode, first, count int) { c.Call("drawArrays", mode, first, count) }
go
func (c *Context) DrawArrays(mode, first, count int) { c.Call("drawArrays", mode, first, count) }
[ "func", "(", "c", "*", "Context", ")", "DrawArrays", "(", "mode", ",", "first", ",", "count", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "mode", ",", "first", ",", "count", ")", "\n", "}" ]
// Render geometric primitives from bound and enabled vertex data.
[ "Render", "geometric", "primitives", "from", "bound", "and", "enabled", "vertex", "data", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L611-L613
125,836
gopherjs/webgl
webgl.go
DrawElements
func (c *Context) DrawElements(mode, count, typ, offset int) { c.Call("drawElements", mode, count, typ, offset) }
go
func (c *Context) DrawElements(mode, count, typ, offset int) { c.Call("drawElements", mode, count, typ, offset) }
[ "func", "(", "c", "*", "Context", ")", "DrawElements", "(", "mode", ",", "count", ",", "typ", ",", "offset", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "mode", ",", "count", ",", "typ", ",", "offset", ")", "\n", "}" ]
// Renders geometric primitives indexed by element array data.
[ "Renders", "geometric", "primitives", "indexed", "by", "element", "array", "data", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L616-L618
125,837
gopherjs/webgl
webgl.go
FrameBufferRenderBuffer
func (c *Context) FrameBufferRenderBuffer(target, attachment, renderbufferTarget int, renderbuffer *js.Object) { c.Call("framebufferRenderBuffer", target, attachment, renderbufferTarget, renderbuffer) }
go
func (c *Context) FrameBufferRenderBuffer(target, attachment, renderbufferTarget int, renderbuffer *js.Object) { c.Call("framebufferRenderBuffer", target, attachment, renderbufferTarget, renderbuffer) }
[ "func", "(", "c", "*", "Context", ")", "FrameBufferRenderBuffer", "(", "target", ",", "attachment", ",", "renderbufferTarget", "int", ",", "renderbuffer", "*", "js", ".", "Object", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "attachm...
// Attaches a WebGLRenderbuffer object as a logical buffer to the // currently bound WebGLFramebuffer object.
[ "Attaches", "a", "WebGLRenderbuffer", "object", "as", "a", "logical", "buffer", "to", "the", "currently", "bound", "WebGLFramebuffer", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L641-L643
125,838
gopherjs/webgl
webgl.go
FramebufferTexture2D
func (c *Context) FramebufferTexture2D(target, attachment, textarget int, texture *js.Object, level int) { c.Call("framebufferTexture2D", target, attachment, textarget, texture, level) }
go
func (c *Context) FramebufferTexture2D(target, attachment, textarget int, texture *js.Object, level int) { c.Call("framebufferTexture2D", target, attachment, textarget, texture, level) }
[ "func", "(", "c", "*", "Context", ")", "FramebufferTexture2D", "(", "target", ",", "attachment", ",", "textarget", "int", ",", "texture", "*", "js", ".", "Object", ",", "level", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", ...
// Attaches a texture to a WebGLFramebuffer object.
[ "Attaches", "a", "texture", "to", "a", "WebGLFramebuffer", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L646-L648
125,839
gopherjs/webgl
webgl.go
GetActiveAttrib
func (c *Context) GetActiveAttrib(program *js.Object, index int) *js.Object { return c.Call("getActiveAttrib", program, index) }
go
func (c *Context) GetActiveAttrib(program *js.Object, index int) *js.Object { return c.Call("getActiveAttrib", program, index) }
[ "func", "(", "c", "*", "Context", ")", "GetActiveAttrib", "(", "program", "*", "js", ".", "Object", ",", "index", "int", ")", "*", "js", ".", "Object", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "program", ",", "index", ")", "\n", "}"...
// Returns an WebGLActiveInfo object containing the size, type, and name // of a vertex attribute at a specific index position in a program object.
[ "Returns", "an", "WebGLActiveInfo", "object", "containing", "the", "size", "type", "and", "name", "of", "a", "vertex", "attribute", "at", "a", "specific", "index", "position", "in", "a", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L664-L666
125,840
gopherjs/webgl
webgl.go
GetAttachedShaders
func (c *Context) GetAttachedShaders(program *js.Object) []*js.Object { objs := c.Call("getAttachedShaders", program) shaders := make([]*js.Object, objs.Length()) for i := 0; i < objs.Length(); i++ { shaders[i] = objs.Index(i) } return shaders }
go
func (c *Context) GetAttachedShaders(program *js.Object) []*js.Object { objs := c.Call("getAttachedShaders", program) shaders := make([]*js.Object, objs.Length()) for i := 0; i < objs.Length(); i++ { shaders[i] = objs.Index(i) } return shaders }
[ "func", "(", "c", "*", "Context", ")", "GetAttachedShaders", "(", "program", "*", "js", ".", "Object", ")", "[", "]", "*", "js", ".", "Object", "{", "objs", ":=", "c", ".", "Call", "(", "\"", "\"", ",", "program", ")", "\n", "shaders", ":=", "mak...
// Returns a slice of WebGLShaders bound to a WebGLProgram.
[ "Returns", "a", "slice", "of", "WebGLShaders", "bound", "to", "a", "WebGLProgram", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L675-L682
125,841
gopherjs/webgl
webgl.go
GetAttribLocation
func (c *Context) GetAttribLocation(program *js.Object, name string) int { return c.Call("getAttribLocation", program, name).Int() }
go
func (c *Context) GetAttribLocation(program *js.Object, name string) int { return c.Call("getAttribLocation", program, name).Int() }
[ "func", "(", "c", "*", "Context", ")", "GetAttribLocation", "(", "program", "*", "js", ".", "Object", ",", "name", "string", ")", "int", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "program", ",", "name", ")", ".", "Int", "(", ")", "\n...
// Returns an index to the location in a program of a named attribute variable.
[ "Returns", "an", "index", "to", "the", "location", "in", "a", "program", "of", "a", "named", "attribute", "variable", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L685-L687
125,842
gopherjs/webgl
webgl.go
GetProgramParameteri
func (c *Context) GetProgramParameteri(program *js.Object, pname int) int { return c.Call("getProgramParameter", program, pname).Int() }
go
func (c *Context) GetProgramParameteri(program *js.Object, pname int) int { return c.Call("getProgramParameter", program, pname).Int() }
[ "func", "(", "c", "*", "Context", ")", "GetProgramParameteri", "(", "program", "*", "js", ".", "Object", ",", "pname", "int", ")", "int", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "program", ",", "pname", ")", ".", "Int", "(", ")", "...
// Returns the value of the program parameter that corresponds to a supplied pname // which is interpreted as an int.
[ "Returns", "the", "value", "of", "the", "program", "parameter", "that", "corresponds", "to", "a", "supplied", "pname", "which", "is", "interpreted", "as", "an", "int", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L720-L722
125,843
gopherjs/webgl
webgl.go
GetProgramParameterb
func (c *Context) GetProgramParameterb(program *js.Object, pname int) bool { return c.Call("getProgramParameter", program, pname).Bool() }
go
func (c *Context) GetProgramParameterb(program *js.Object, pname int) bool { return c.Call("getProgramParameter", program, pname).Bool() }
[ "func", "(", "c", "*", "Context", ")", "GetProgramParameterb", "(", "program", "*", "js", ".", "Object", ",", "pname", "int", ")", "bool", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "program", ",", "pname", ")", ".", "Bool", "(", ")", ...
// Returns the value of the program parameter that corresponds to a supplied pname // which is interpreted as a bool.
[ "Returns", "the", "value", "of", "the", "program", "parameter", "that", "corresponds", "to", "a", "supplied", "pname", "which", "is", "interpreted", "as", "a", "bool", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L726-L728
125,844
gopherjs/webgl
webgl.go
GetProgramInfoLog
func (c *Context) GetProgramInfoLog(program *js.Object) string { return c.Call("getProgramInfoLog", program).String() }
go
func (c *Context) GetProgramInfoLog(program *js.Object) string { return c.Call("getProgramInfoLog", program).String() }
[ "func", "(", "c", "*", "Context", ")", "GetProgramInfoLog", "(", "program", "*", "js", ".", "Object", ")", "string", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "program", ")", ".", "String", "(", ")", "\n", "}" ]
// Returns information about the last error that occurred during // the failed linking or validation of a WebGL program object.
[ "Returns", "information", "about", "the", "last", "error", "that", "occurred", "during", "the", "failed", "linking", "or", "validation", "of", "a", "WebGL", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L732-L734
125,845
gopherjs/webgl
webgl.go
GetShaderParameterb
func (c *Context) GetShaderParameterb(shader *js.Object, pname int) bool { return c.Call("getShaderParameter", shader, pname).Bool() }
go
func (c *Context) GetShaderParameterb(shader *js.Object, pname int) bool { return c.Call("getShaderParameter", shader, pname).Bool() }
[ "func", "(", "c", "*", "Context", ")", "GetShaderParameterb", "(", "shader", "*", "js", ".", "Object", ",", "pname", "int", ")", "bool", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "shader", ",", "pname", ")", ".", "Bool", "(", ")", "\...
// Returns the value of the parameter associated with pname for a shader object.
[ "Returns", "the", "value", "of", "the", "parameter", "associated", "with", "pname", "for", "a", "shader", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L749-L751
125,846
gopherjs/webgl
webgl.go
GetShaderInfoLog
func (c *Context) GetShaderInfoLog(shader *js.Object) string { return c.Call("getShaderInfoLog", shader).String() }
go
func (c *Context) GetShaderInfoLog(shader *js.Object) string { return c.Call("getShaderInfoLog", shader).String() }
[ "func", "(", "c", "*", "Context", ")", "GetShaderInfoLog", "(", "shader", "*", "js", ".", "Object", ")", "string", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "shader", ")", ".", "String", "(", ")", "\n", "}" ]
// Returns errors which occur when compiling a shader.
[ "Returns", "errors", "which", "occur", "when", "compiling", "a", "shader", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L754-L756
125,847
gopherjs/webgl
webgl.go
GetSupportedExtensions
func (c *Context) GetSupportedExtensions() []string { ext := c.Call("getSupportedExtensions") extensions := make([]string, ext.Length()) for i := 0; i < ext.Length(); i++ { extensions[i] = ext.Index(i).String() } return extensions }
go
func (c *Context) GetSupportedExtensions() []string { ext := c.Call("getSupportedExtensions") extensions := make([]string, ext.Length()) for i := 0; i < ext.Length(); i++ { extensions[i] = ext.Index(i).String() } return extensions }
[ "func", "(", "c", "*", "Context", ")", "GetSupportedExtensions", "(", ")", "[", "]", "string", "{", "ext", ":=", "c", ".", "Call", "(", "\"", "\"", ")", "\n", "extensions", ":=", "make", "(", "[", "]", "string", ",", "ext", ".", "Length", "(", ")...
// Returns a slice of supported extension strings.
[ "Returns", "a", "slice", "of", "supported", "extension", "strings", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L764-L771
125,848
gopherjs/webgl
webgl.go
GetUniformLocation
func (c *Context) GetUniformLocation(program *js.Object, name string) *js.Object { return c.Call("getUniformLocation", program, name) }
go
func (c *Context) GetUniformLocation(program *js.Object, name string) *js.Object { return c.Call("getUniformLocation", program, name) }
[ "func", "(", "c", "*", "Context", ")", "GetUniformLocation", "(", "program", "*", "js", ".", "Object", ",", "name", "string", ")", "*", "js", ".", "Object", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "program", ",", "name", ")", "\n", ...
// Returns a WebGLUniformLocation object for the location // of a uniform variable within a WebGLProgram object.
[ "Returns", "a", "WebGLUniformLocation", "object", "for", "the", "location", "of", "a", "uniform", "variable", "within", "a", "WebGLProgram", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L787-L789
125,849
gopherjs/webgl
webgl.go
GetVertexAttribOffset
func (c *Context) GetVertexAttribOffset(index, pname int) int { return c.Call("getVertexAttribOffset", index, pname).Int() }
go
func (c *Context) GetVertexAttribOffset(index, pname int) int { return c.Call("getVertexAttribOffset", index, pname).Int() }
[ "func", "(", "c", "*", "Context", ")", "GetVertexAttribOffset", "(", "index", ",", "pname", "int", ")", "int", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "index", ",", "pname", ")", ".", "Int", "(", ")", "\n", "}" ]
// Returns the address of a specified vertex attribute.
[ "Returns", "the", "address", "of", "a", "specified", "vertex", "attribute", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L799-L801
125,850
gopherjs/webgl
webgl.go
IsProgram
func (c *Context) IsProgram(program *js.Object) bool { return c.Call("isProgram", program).Bool() }
go
func (c *Context) IsProgram(program *js.Object) bool { return c.Call("isProgram", program).Bool() }
[ "func", "(", "c", "*", "Context", ")", "IsProgram", "(", "program", "*", "js", ".", "Object", ")", "bool", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "program", ")", ".", "Bool", "(", ")", "\n", "}" ]
// Returns true if program object is valid, false otherwise.
[ "Returns", "true", "if", "program", "object", "is", "valid", "false", "otherwise", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L821-L823
125,851
gopherjs/webgl
webgl.go
IsShader
func (c *Context) IsShader(shader *js.Object) bool { return c.Call("isShader", shader).Bool() }
go
func (c *Context) IsShader(shader *js.Object) bool { return c.Call("isShader", shader).Bool() }
[ "func", "(", "c", "*", "Context", ")", "IsShader", "(", "shader", "*", "js", ".", "Object", ")", "bool", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "shader", ")", ".", "Bool", "(", ")", "\n", "}" ]
// Returns true if shader is valid, false otherwise.
[ "Returns", "true", "if", "shader", "is", "valid", "false", "otherwise", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L831-L833
125,852
gopherjs/webgl
webgl.go
IsTexture
func (c *Context) IsTexture(texture *js.Object) bool { return c.Call("isTexture", texture).Bool() }
go
func (c *Context) IsTexture(texture *js.Object) bool { return c.Call("isTexture", texture).Bool() }
[ "func", "(", "c", "*", "Context", ")", "IsTexture", "(", "texture", "*", "js", ".", "Object", ")", "bool", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "texture", ")", ".", "Bool", "(", ")", "\n", "}" ]
// Returns true if texture is valid, false otherwise.
[ "Returns", "true", "if", "texture", "is", "valid", "false", "otherwise", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L836-L838
125,853
gopherjs/webgl
webgl.go
IsEnabled
func (c *Context) IsEnabled(capability int) bool { return c.Call("isEnabled", capability).Bool() }
go
func (c *Context) IsEnabled(capability int) bool { return c.Call("isEnabled", capability).Bool() }
[ "func", "(", "c", "*", "Context", ")", "IsEnabled", "(", "capability", "int", ")", "bool", "{", "return", "c", ".", "Call", "(", "\"", "\"", ",", "capability", ")", ".", "Bool", "(", ")", "\n", "}" ]
// Returns whether or not a WebGL capability is enabled for this context.
[ "Returns", "whether", "or", "not", "a", "WebGL", "capability", "is", "enabled", "for", "this", "context", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L841-L843
125,854
gopherjs/webgl
webgl.go
PixelStorei
func (c *Context) PixelStorei(pname, param int) { c.Call("pixelStorei", pname, param) }
go
func (c *Context) PixelStorei(pname, param int) { c.Call("pixelStorei", pname, param) }
[ "func", "(", "c", "*", "Context", ")", "PixelStorei", "(", "pname", ",", "param", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "pname", ",", "param", ")", "\n", "}" ]
// Sets pixel storage modes for readPixels and unpacking of textures // with texImage2D and texSubImage2D.
[ "Sets", "pixel", "storage", "modes", "for", "readPixels", "and", "unpacking", "of", "textures", "with", "texImage2D", "and", "texSubImage2D", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L858-L860
125,855
gopherjs/webgl
webgl.go
PolygonOffset
func (c *Context) PolygonOffset(factor, units float64) { c.Call("polygonOffset", factor, units) }
go
func (c *Context) PolygonOffset(factor, units float64) { c.Call("polygonOffset", factor, units) }
[ "func", "(", "c", "*", "Context", ")", "PolygonOffset", "(", "factor", ",", "units", "float64", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "factor", ",", "units", ")", "\n", "}" ]
// Sets the implementation-specific units and scale factor // used to calculate fragment depth values.
[ "Sets", "the", "implementation", "-", "specific", "units", "and", "scale", "factor", "used", "to", "calculate", "fragment", "depth", "values", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L864-L866
125,856
gopherjs/webgl
webgl.go
RenderbufferStorage
func (c *Context) RenderbufferStorage(target, internalFormat, width, height int) { c.Call("renderbufferStorage", target, internalFormat, width, height) }
go
func (c *Context) RenderbufferStorage(target, internalFormat, width, height int) { c.Call("renderbufferStorage", target, internalFormat, width, height) }
[ "func", "(", "c", "*", "Context", ")", "RenderbufferStorage", "(", "target", ",", "internalFormat", ",", "width", ",", "height", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "internalFormat", ",", "width", ",", "height", ")",...
// Creates or replaces the data store for the currently bound WebGLRenderbuffer object.
[ "Creates", "or", "replaces", "the", "data", "store", "for", "the", "currently", "bound", "WebGLRenderbuffer", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L876-L878
125,857
gopherjs/webgl
webgl.go
ShaderSource
func (c *Context) ShaderSource(shader *js.Object, source string) { c.Call("shaderSource", shader, source) }
go
func (c *Context) ShaderSource(shader *js.Object, source string) { c.Call("shaderSource", shader, source) }
[ "func", "(", "c", "*", "Context", ")", "ShaderSource", "(", "shader", "*", "js", ".", "Object", ",", "source", "string", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "shader", ",", "source", ")", "\n", "}" ]
// Sets and replaces shader source code in a shader object.
[ "Sets", "and", "replaces", "shader", "source", "code", "in", "a", "shader", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L890-L892
125,858
gopherjs/webgl
webgl.go
TexParameteri
func (c *Context) TexParameteri(target int, pname int, param int) { c.Call("texParameteri", target, pname, param) }
go
func (c *Context) TexParameteri(target int, pname int, param int) { c.Call("texParameteri", target, pname, param) }
[ "func", "(", "c", "*", "Context", ")", "TexParameteri", "(", "target", "int", ",", "pname", "int", ",", "param", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "target", ",", "pname", ",", "param", ")", "\n", "}" ]
// Sets texture parameters for the current texture unit.
[ "Sets", "texture", "parameters", "for", "the", "current", "texture", "unit", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L907-L909
125,859
gopherjs/webgl
webgl.go
TexSubImage2D
func (c *Context) TexSubImage2D(target, level, xoffset, yoffset, format, typ int, image *js.Object) { c.Call("texSubImage2D", target, level, xoffset, yoffset, format, typ, image) }
go
func (c *Context) TexSubImage2D(target, level, xoffset, yoffset, format, typ int, image *js.Object) { c.Call("texSubImage2D", target, level, xoffset, yoffset, format, typ, image) }
[ "func", "(", "c", "*", "Context", ")", "TexSubImage2D", "(", "target", ",", "level", ",", "xoffset", ",", "yoffset", ",", "format", ",", "typ", "int", ",", "image", "*", "js", ".", "Object", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "targ...
// Replaces a portion of an existing 2D texture image with all of another image.
[ "Replaces", "a", "portion", "of", "an", "existing", "2D", "texture", "image", "with", "all", "of", "another", "image", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L912-L914
125,860
gopherjs/webgl
webgl.go
Uniform1f
func (c *Context) Uniform1f(location *js.Object, x float32) { c.Call("uniform1f", location, x) }
go
func (c *Context) Uniform1f(location *js.Object, x float32) { c.Call("uniform1f", location, x) }
[ "func", "(", "c", "*", "Context", ")", "Uniform1f", "(", "location", "*", "js", ".", "Object", ",", "x", "float32", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "location", ",", "x", ")", "\n", "}" ]
// Assigns a floating point value to a uniform variable for the current program object.
[ "Assigns", "a", "floating", "point", "value", "to", "a", "uniform", "variable", "for", "the", "current", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L917-L919
125,861
gopherjs/webgl
webgl.go
Uniform1i
func (c *Context) Uniform1i(location *js.Object, x int) { c.Call("uniform1i", location, x) }
go
func (c *Context) Uniform1i(location *js.Object, x int) { c.Call("uniform1i", location, x) }
[ "func", "(", "c", "*", "Context", ")", "Uniform1i", "(", "location", "*", "js", ".", "Object", ",", "x", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "location", ",", "x", ")", "\n", "}" ]
// Assigns a integer value to a uniform variable for the current program object.
[ "Assigns", "a", "integer", "value", "to", "a", "uniform", "variable", "for", "the", "current", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L922-L924
125,862
gopherjs/webgl
webgl.go
Uniform2f
func (c *Context) Uniform2f(location *js.Object, x, y float32) { c.Call("uniform2f", location, x, y) }
go
func (c *Context) Uniform2f(location *js.Object, x, y float32) { c.Call("uniform2f", location, x, y) }
[ "func", "(", "c", "*", "Context", ")", "Uniform2f", "(", "location", "*", "js", ".", "Object", ",", "x", ",", "y", "float32", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "location", ",", "x", ",", "y", ")", "\n", "}" ]
// Assigns 2 floating point values to a uniform variable for the current program object.
[ "Assigns", "2", "floating", "point", "values", "to", "a", "uniform", "variable", "for", "the", "current", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L927-L929
125,863
gopherjs/webgl
webgl.go
Uniform2i
func (c *Context) Uniform2i(location *js.Object, x, y int) { c.Call("uniform2i", location, x, y) }
go
func (c *Context) Uniform2i(location *js.Object, x, y int) { c.Call("uniform2i", location, x, y) }
[ "func", "(", "c", "*", "Context", ")", "Uniform2i", "(", "location", "*", "js", ".", "Object", ",", "x", ",", "y", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "location", ",", "x", ",", "y", ")", "\n", "}" ]
// Assigns 2 integer values to a uniform variable for the current program object.
[ "Assigns", "2", "integer", "values", "to", "a", "uniform", "variable", "for", "the", "current", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L932-L934
125,864
gopherjs/webgl
webgl.go
Uniform3f
func (c *Context) Uniform3f(location *js.Object, x, y, z float32) { c.Call("uniform3f", location, x, y, z) }
go
func (c *Context) Uniform3f(location *js.Object, x, y, z float32) { c.Call("uniform3f", location, x, y, z) }
[ "func", "(", "c", "*", "Context", ")", "Uniform3f", "(", "location", "*", "js", ".", "Object", ",", "x", ",", "y", ",", "z", "float32", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "location", ",", "x", ",", "y", ",", "z", ")", "\n", "...
// Assigns 3 floating point values to a uniform variable for the current program object.
[ "Assigns", "3", "floating", "point", "values", "to", "a", "uniform", "variable", "for", "the", "current", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L937-L939
125,865
gopherjs/webgl
webgl.go
Uniform3i
func (c *Context) Uniform3i(location *js.Object, x, y, z int) { c.Call("uniform3i", location, x, y, z) }
go
func (c *Context) Uniform3i(location *js.Object, x, y, z int) { c.Call("uniform3i", location, x, y, z) }
[ "func", "(", "c", "*", "Context", ")", "Uniform3i", "(", "location", "*", "js", ".", "Object", ",", "x", ",", "y", ",", "z", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "location", ",", "x", ",", "y", ",", "z", ")", "\n", "}" ]
// Assigns 3 integer values to a uniform variable for the current program object.
[ "Assigns", "3", "integer", "values", "to", "a", "uniform", "variable", "for", "the", "current", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L942-L944
125,866
gopherjs/webgl
webgl.go
Uniform4f
func (c *Context) Uniform4f(location *js.Object, x, y, z, w float32) { c.Call("uniform4f", location, x, y, z, w) }
go
func (c *Context) Uniform4f(location *js.Object, x, y, z, w float32) { c.Call("uniform4f", location, x, y, z, w) }
[ "func", "(", "c", "*", "Context", ")", "Uniform4f", "(", "location", "*", "js", ".", "Object", ",", "x", ",", "y", ",", "z", ",", "w", "float32", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "location", ",", "x", ",", "y", ",", "z", ",...
// Assigns 4 floating point values to a uniform variable for the current program object.
[ "Assigns", "4", "floating", "point", "values", "to", "a", "uniform", "variable", "for", "the", "current", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L947-L949
125,867
gopherjs/webgl
webgl.go
Uniform4i
func (c *Context) Uniform4i(location *js.Object, x, y, z, w int) { c.Call("uniform4i", location, x, y, z, w) }
go
func (c *Context) Uniform4i(location *js.Object, x, y, z, w int) { c.Call("uniform4i", location, x, y, z, w) }
[ "func", "(", "c", "*", "Context", ")", "Uniform4i", "(", "location", "*", "js", ".", "Object", ",", "x", ",", "y", ",", "z", ",", "w", "int", ")", "{", "c", ".", "Call", "(", "\"", "\"", ",", "location", ",", "x", ",", "y", ",", "z", ",", ...
// Assigns 4 integer values to a uniform variable for the current program object.
[ "Assigns", "4", "integer", "values", "to", "a", "uniform", "variable", "for", "the", "current", "program", "object", "." ]
39bd6d41eeb587730fcaa65adf71978fb10675bc
https://github.com/gopherjs/webgl/blob/39bd6d41eeb587730fcaa65adf71978fb10675bc/webgl.go#L952-L954
125,868
benbjohnson/phantomjs
phantomjs.go
Open
func (p *Process) Open() error { if err := func() error { // Generate temporary path to run script from. path, err := ioutil.TempDir("", "phantomjs-") if err != nil { return err } p.path = path // Write shim script. scriptPath := filepath.Join(path, "shim.js") if err := ioutil.WriteFile(scriptPath,...
go
func (p *Process) Open() error { if err := func() error { // Generate temporary path to run script from. path, err := ioutil.TempDir("", "phantomjs-") if err != nil { return err } p.path = path // Write shim script. scriptPath := filepath.Join(path, "shim.js") if err := ioutil.WriteFile(scriptPath,...
[ "func", "(", "p", "*", "Process", ")", "Open", "(", ")", "error", "{", "if", "err", ":=", "func", "(", ")", "error", "{", "// Generate temporary path to run script from.", "path", ",", "err", ":=", "ioutil", ".", "TempDir", "(", "\"", "\"", ",", "\"", ...
// Open start the phantomjs process with the shim script.
[ "Open", "start", "the", "phantomjs", "process", "with", "the", "shim", "script", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L69-L106
125,869
benbjohnson/phantomjs
phantomjs.go
Close
func (p *Process) Close() (err error) { // Kill process. if p.cmd != nil { if e := p.cmd.Process.Kill(); e != nil && err == nil { err = e } p.cmd.Wait() } // Remove shim file. if p.path != "" { if e := os.RemoveAll(p.path); e != nil && err == nil { err = e } } return err }
go
func (p *Process) Close() (err error) { // Kill process. if p.cmd != nil { if e := p.cmd.Process.Kill(); e != nil && err == nil { err = e } p.cmd.Wait() } // Remove shim file. if p.path != "" { if e := os.RemoveAll(p.path); e != nil && err == nil { err = e } } return err }
[ "func", "(", "p", "*", "Process", ")", "Close", "(", ")", "(", "err", "error", ")", "{", "// Kill process.", "if", "p", ".", "cmd", "!=", "nil", "{", "if", "e", ":=", "p", ".", "cmd", ".", "Process", ".", "Kill", "(", ")", ";", "e", "!=", "ni...
// Close stops the process.
[ "Close", "stops", "the", "process", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L109-L126
125,870
benbjohnson/phantomjs
phantomjs.go
wait
func (p *Process) wait() error { ticker := time.NewTicker(1000 * time.Millisecond) defer ticker.Stop() timer := time.NewTimer(30 * time.Second) defer ticker.Stop() for { select { case <-timer.C: return errors.New("timeout") case <-ticker.C: if err := p.ping(); err == nil { return nil } } } ...
go
func (p *Process) wait() error { ticker := time.NewTicker(1000 * time.Millisecond) defer ticker.Stop() timer := time.NewTimer(30 * time.Second) defer ticker.Stop() for { select { case <-timer.C: return errors.New("timeout") case <-ticker.C: if err := p.ping(); err == nil { return nil } } } ...
[ "func", "(", "p", "*", "Process", ")", "wait", "(", ")", "error", "{", "ticker", ":=", "time", ".", "NewTicker", "(", "1000", "*", "time", ".", "Millisecond", ")", "\n", "defer", "ticker", ".", "Stop", "(", ")", "\n\n", "timer", ":=", "time", ".", ...
// wait continually checks the process until it gets a response or times out.
[ "wait", "continually", "checks", "the", "process", "until", "it", "gets", "a", "response", "or", "times", "out", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L134-L151
125,871
benbjohnson/phantomjs
phantomjs.go
ping
func (p *Process) ping() error { // Send request. resp, err := http.Get(p.URL() + "/ping") if err != nil { return err } resp.Body.Close() // Verify successful status code. if resp.StatusCode != http.StatusOK { return fmt.Errorf("unexpected status: %d", resp.StatusCode) } return nil }
go
func (p *Process) ping() error { // Send request. resp, err := http.Get(p.URL() + "/ping") if err != nil { return err } resp.Body.Close() // Verify successful status code. if resp.StatusCode != http.StatusOK { return fmt.Errorf("unexpected status: %d", resp.StatusCode) } return nil }
[ "func", "(", "p", "*", "Process", ")", "ping", "(", ")", "error", "{", "// Send request.", "resp", ",", "err", ":=", "http", ".", "Get", "(", "p", ".", "URL", "(", ")", "+", "\"", "\"", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err",...
// ping checks the process to see if it is up.
[ "ping", "checks", "the", "process", "to", "see", "if", "it", "is", "up", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L154-L167
125,872
benbjohnson/phantomjs
phantomjs.go
CreateWebPage
func (p *Process) CreateWebPage() (*WebPage, error) { var resp struct { Ref refJSON `json:"ref"` } if err := p.doJSON("POST", "/webpage/Create", nil, &resp); err != nil { return nil, err } return &WebPage{ref: newRef(p, resp.Ref.ID)}, nil }
go
func (p *Process) CreateWebPage() (*WebPage, error) { var resp struct { Ref refJSON `json:"ref"` } if err := p.doJSON("POST", "/webpage/Create", nil, &resp); err != nil { return nil, err } return &WebPage{ref: newRef(p, resp.Ref.ID)}, nil }
[ "func", "(", "p", "*", "Process", ")", "CreateWebPage", "(", ")", "(", "*", "WebPage", ",", "error", ")", "{", "var", "resp", "struct", "{", "Ref", "refJSON", "`json:\"ref\"`", "\n", "}", "\n", "if", "err", ":=", "p", ".", "doJSON", "(", "\"", "\""...
// CreateWebPage returns a new instance of a "webpage".
[ "CreateWebPage", "returns", "a", "new", "instance", "of", "a", "webpage", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L170-L178
125,873
benbjohnson/phantomjs
phantomjs.go
Open
func (p *WebPage) Open(url string) error { req := map[string]interface{}{ "ref": p.ref.id, "url": url, } var resp struct { Status string `json:"status"` } if err := p.ref.process.doJSON("POST", "/webpage/Open", req, &resp); err != nil { return err } if resp.Status != "success" { return errors.New("fai...
go
func (p *WebPage) Open(url string) error { req := map[string]interface{}{ "ref": p.ref.id, "url": url, } var resp struct { Status string `json:"status"` } if err := p.ref.process.doJSON("POST", "/webpage/Open", req, &resp); err != nil { return err } if resp.Status != "success" { return errors.New("fai...
[ "func", "(", "p", "*", "WebPage", ")", "Open", "(", "url", "string", ")", "error", "{", "req", ":=", "map", "[", "string", "]", "interface", "{", "}", "{", "\"", "\"", ":", "p", ".", "ref", ".", "id", ",", "\"", "\"", ":", "url", ",", "}", ...
// Open opens a URL.
[ "Open", "opens", "a", "URL", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L253-L269
125,874
benbjohnson/phantomjs
phantomjs.go
ClipRect
func (p *WebPage) ClipRect() (Rect, error) { var resp struct { Value rectJSON `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/ClipRect", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return Rect{}, err } return Rect{ Top: resp.Value.Top, Left: resp.Value.Left, Width...
go
func (p *WebPage) ClipRect() (Rect, error) { var resp struct { Value rectJSON `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/ClipRect", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return Rect{}, err } return Rect{ Top: resp.Value.Top, Left: resp.Value.Left, Width...
[ "func", "(", "p", "*", "WebPage", ")", "ClipRect", "(", ")", "(", "Rect", ",", "error", ")", "{", "var", "resp", "struct", "{", "Value", "rectJSON", "`json:\"value\"`", "\n", "}", "\n", "if", "err", ":=", "p", ".", "ref", ".", "process", ".", "doJS...
// ClipRect returns the clipping rectangle used when rendering. // Returns nil if no clipping rectangle is set.
[ "ClipRect", "returns", "the", "clipping", "rectangle", "used", "when", "rendering", ".", "Returns", "nil", "if", "no", "clipping", "rectangle", "is", "set", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L295-L308
125,875
benbjohnson/phantomjs
phantomjs.go
SetClipRect
func (p *WebPage) SetClipRect(rect Rect) error { req := map[string]interface{}{ "ref": p.ref.id, "rect": rectJSON{ Top: rect.Top, Left: rect.Left, Width: rect.Width, Height: rect.Height, }, } return p.ref.process.doJSON("POST", "/webpage/SetClipRect", req, nil) }
go
func (p *WebPage) SetClipRect(rect Rect) error { req := map[string]interface{}{ "ref": p.ref.id, "rect": rectJSON{ Top: rect.Top, Left: rect.Left, Width: rect.Width, Height: rect.Height, }, } return p.ref.process.doJSON("POST", "/webpage/SetClipRect", req, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetClipRect", "(", "rect", "Rect", ")", "error", "{", "req", ":=", "map", "[", "string", "]", "interface", "{", "}", "{", "\"", "\"", ":", "p", ".", "ref", ".", "id", ",", "\"", "\"", ":", "rectJSON", "{"...
// SetClipRect sets the clipping rectangle used when rendering. // Set to nil to render the entire webpage.
[ "SetClipRect", "sets", "the", "clipping", "rectangle", "used", "when", "rendering", ".", "Set", "to", "nil", "to", "render", "the", "entire", "webpage", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L312-L323
125,876
benbjohnson/phantomjs
phantomjs.go
Cookies
func (p *WebPage) Cookies() ([]*http.Cookie, error) { var resp struct { Value []cookieJSON `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/Cookies", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return nil, err } a := make([]*http.Cookie, len(resp.Value)) for i := range resp...
go
func (p *WebPage) Cookies() ([]*http.Cookie, error) { var resp struct { Value []cookieJSON `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/Cookies", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return nil, err } a := make([]*http.Cookie, len(resp.Value)) for i := range resp...
[ "func", "(", "p", "*", "WebPage", ")", "Cookies", "(", ")", "(", "[", "]", "*", "http", ".", "Cookie", ",", "error", ")", "{", "var", "resp", "struct", "{", "Value", "[", "]", "cookieJSON", "`json:\"value\"`", "\n", "}", "\n", "if", "err", ":=", ...
// Cookies returns a list of cookies visible to the current URL.
[ "Cookies", "returns", "a", "list", "of", "cookies", "visible", "to", "the", "current", "URL", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L342-L355
125,877
benbjohnson/phantomjs
phantomjs.go
SetCookies
func (p *WebPage) SetCookies(cookies []*http.Cookie) error { a := make([]cookieJSON, len(cookies)) for i := range cookies { a[i] = encodeCookieJSON(cookies[i]) } req := map[string]interface{}{"ref": p.ref.id, "cookies": a} return p.ref.process.doJSON("POST", "/webpage/SetCookies", req, nil) }
go
func (p *WebPage) SetCookies(cookies []*http.Cookie) error { a := make([]cookieJSON, len(cookies)) for i := range cookies { a[i] = encodeCookieJSON(cookies[i]) } req := map[string]interface{}{"ref": p.ref.id, "cookies": a} return p.ref.process.doJSON("POST", "/webpage/SetCookies", req, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetCookies", "(", "cookies", "[", "]", "*", "http", ".", "Cookie", ")", "error", "{", "a", ":=", "make", "(", "[", "]", "cookieJSON", ",", "len", "(", "cookies", ")", ")", "\n", "for", "i", ":=", "range", ...
// SetCookies sets a list of cookies visible to the current URL.
[ "SetCookies", "sets", "a", "list", "of", "cookies", "visible", "to", "the", "current", "URL", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L358-L365
125,878
benbjohnson/phantomjs
phantomjs.go
CustomHeaders
func (p *WebPage) CustomHeaders() (http.Header, error) { var resp struct { Value map[string]string `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/CustomHeaders", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return nil, err } // Convert to a header object. hdr := make(http....
go
func (p *WebPage) CustomHeaders() (http.Header, error) { var resp struct { Value map[string]string `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/CustomHeaders", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return nil, err } // Convert to a header object. hdr := make(http....
[ "func", "(", "p", "*", "WebPage", ")", "CustomHeaders", "(", ")", "(", "http", ".", "Header", ",", "error", ")", "{", "var", "resp", "struct", "{", "Value", "map", "[", "string", "]", "string", "`json:\"value\"`", "\n", "}", "\n", "if", "err", ":=", ...
// CustomHeaders returns a list of additional headers sent with the web page.
[ "CustomHeaders", "returns", "a", "list", "of", "additional", "headers", "sent", "with", "the", "web", "page", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L368-L382
125,879
benbjohnson/phantomjs
phantomjs.go
SetCustomHeaders
func (p *WebPage) SetCustomHeaders(header http.Header) error { m := make(map[string]string) for key := range header { m[key] = header.Get(key) } req := map[string]interface{}{"ref": p.ref.id, "headers": m} return p.ref.process.doJSON("POST", "/webpage/SetCustomHeaders", req, nil) }
go
func (p *WebPage) SetCustomHeaders(header http.Header) error { m := make(map[string]string) for key := range header { m[key] = header.Get(key) } req := map[string]interface{}{"ref": p.ref.id, "headers": m} return p.ref.process.doJSON("POST", "/webpage/SetCustomHeaders", req, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetCustomHeaders", "(", "header", "http", ".", "Header", ")", "error", "{", "m", ":=", "make", "(", "map", "[", "string", "]", "string", ")", "\n", "for", "key", ":=", "range", "header", "{", "m", "[", "key",...
// SetCustomHeaders sets a list of additional headers sent with the web page. // // This function does not support multiple headers with the same name. Only // the first value for a header key will be used.
[ "SetCustomHeaders", "sets", "a", "list", "of", "additional", "headers", "sent", "with", "the", "web", "page", ".", "This", "function", "does", "not", "support", "multiple", "headers", "with", "the", "same", "name", ".", "Only", "the", "first", "value", "for"...
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L388-L395
125,880
benbjohnson/phantomjs
phantomjs.go
SetFrameContent
func (p *WebPage) SetFrameContent(content string) error { return p.ref.process.doJSON("POST", "/webpage/SetFrameContent", map[string]interface{}{"ref": p.ref.id, "content": content}, nil) }
go
func (p *WebPage) SetFrameContent(content string) error { return p.ref.process.doJSON("POST", "/webpage/SetFrameContent", map[string]interface{}{"ref": p.ref.id, "content": content}, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetFrameContent", "(", "content", "string", ")", "error", "{", "return", "p", ".", "ref", ".", "process", ".", "doJSON", "(", "\"", "\"", ",", "\"", "\"", ",", "map", "[", "string", "]", "interface", "{", "}"...
// SetFrameContent sets the content of the current frame.
[ "SetFrameContent", "sets", "the", "content", "of", "the", "current", "frame", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L420-L422
125,881
benbjohnson/phantomjs
phantomjs.go
NavigationLocked
func (p *WebPage) NavigationLocked() (bool, error) { var resp struct { Value bool `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/NavigationLocked", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return false, err } return resp.Value, nil }
go
func (p *WebPage) NavigationLocked() (bool, error) { var resp struct { Value bool `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/NavigationLocked", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return false, err } return resp.Value, nil }
[ "func", "(", "p", "*", "WebPage", ")", "NavigationLocked", "(", ")", "(", "bool", ",", "error", ")", "{", "var", "resp", "struct", "{", "Value", "bool", "`json:\"value\"`", "\n", "}", "\n", "if", "err", ":=", "p", ".", "ref", ".", "process", ".", "...
// NavigationLocked returns true if the navigation away from the page is disabled.
[ "NavigationLocked", "returns", "true", "if", "the", "navigation", "away", "from", "the", "page", "is", "disabled", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L508-L516
125,882
benbjohnson/phantomjs
phantomjs.go
SetNavigationLocked
func (p *WebPage) SetNavigationLocked(value bool) error { return p.ref.process.doJSON("POST", "/webpage/SetNavigationLocked", map[string]interface{}{"ref": p.ref.id, "value": value}, nil) }
go
func (p *WebPage) SetNavigationLocked(value bool) error { return p.ref.process.doJSON("POST", "/webpage/SetNavigationLocked", map[string]interface{}{"ref": p.ref.id, "value": value}, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetNavigationLocked", "(", "value", "bool", ")", "error", "{", "return", "p", ".", "ref", ".", "process", ".", "doJSON", "(", "\"", "\"", ",", "\"", "\"", ",", "map", "[", "string", "]", "interface", "{", "}"...
// SetNavigationLocked sets whether navigation away from the page should be disabled.
[ "SetNavigationLocked", "sets", "whether", "navigation", "away", "from", "the", "page", "should", "be", "disabled", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L519-L521
125,883
benbjohnson/phantomjs
phantomjs.go
SetOwnsPages
func (p *WebPage) SetOwnsPages(v bool) error { return p.ref.process.doJSON("POST", "/webpage/SetOwnsPages", map[string]interface{}{"ref": p.ref.id, "value": v}, nil) }
go
func (p *WebPage) SetOwnsPages(v bool) error { return p.ref.process.doJSON("POST", "/webpage/SetOwnsPages", map[string]interface{}{"ref": p.ref.id, "value": v}, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetOwnsPages", "(", "v", "bool", ")", "error", "{", "return", "p", ".", "ref", ".", "process", ".", "doJSON", "(", "\"", "\"", ",", "\"", "\"", ",", "map", "[", "string", "]", "interface", "{", "}", "{", ...
// SetOwnsPages sets whether this page owns pages opened in other windows.
[ "SetOwnsPages", "sets", "whether", "this", "page", "owns", "pages", "opened", "in", "other", "windows", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L557-L559
125,884
benbjohnson/phantomjs
phantomjs.go
Pages
func (p *WebPage) Pages() ([]*WebPage, error) { var resp struct { Refs []refJSON `json:"refs"` } if err := p.ref.process.doJSON("POST", "/webpage/Pages", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return nil, err } // Convert reference IDs to web pages. a := make([]*WebPage, len(resp.Refs)...
go
func (p *WebPage) Pages() ([]*WebPage, error) { var resp struct { Refs []refJSON `json:"refs"` } if err := p.ref.process.doJSON("POST", "/webpage/Pages", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return nil, err } // Convert reference IDs to web pages. a := make([]*WebPage, len(resp.Refs)...
[ "func", "(", "p", "*", "WebPage", ")", "Pages", "(", ")", "(", "[", "]", "*", "WebPage", ",", "error", ")", "{", "var", "resp", "struct", "{", "Refs", "[", "]", "refJSON", "`json:\"refs\"`", "\n", "}", "\n", "if", "err", ":=", "p", ".", "ref", ...
// Pages returns a list of owned pages.
[ "Pages", "returns", "a", "list", "of", "owned", "pages", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L573-L587
125,885
benbjohnson/phantomjs
phantomjs.go
PaperSize
func (p *WebPage) PaperSize() (PaperSize, error) { var resp struct { Value paperSizeJSON `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/PaperSize", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return PaperSize{}, err } return decodePaperSizeJSON(resp.Value), nil }
go
func (p *WebPage) PaperSize() (PaperSize, error) { var resp struct { Value paperSizeJSON `json:"value"` } if err := p.ref.process.doJSON("POST", "/webpage/PaperSize", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return PaperSize{}, err } return decodePaperSizeJSON(resp.Value), nil }
[ "func", "(", "p", "*", "WebPage", ")", "PaperSize", "(", ")", "(", "PaperSize", ",", "error", ")", "{", "var", "resp", "struct", "{", "Value", "paperSizeJSON", "`json:\"value\"`", "\n", "}", "\n", "if", "err", ":=", "p", ".", "ref", ".", "process", "...
// PaperSize returns the size of the web page when rendered as a PDF.
[ "PaperSize", "returns", "the", "size", "of", "the", "web", "page", "when", "rendered", "as", "a", "PDF", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L590-L598
125,886
benbjohnson/phantomjs
phantomjs.go
SetPaperSize
func (p *WebPage) SetPaperSize(size PaperSize) error { req := map[string]interface{}{"ref": p.ref.id, "size": encodePaperSizeJSON(size)} return p.ref.process.doJSON("POST", "/webpage/SetPaperSize", req, nil) }
go
func (p *WebPage) SetPaperSize(size PaperSize) error { req := map[string]interface{}{"ref": p.ref.id, "size": encodePaperSizeJSON(size)} return p.ref.process.doJSON("POST", "/webpage/SetPaperSize", req, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetPaperSize", "(", "size", "PaperSize", ")", "error", "{", "req", ":=", "map", "[", "string", "]", "interface", "{", "}", "{", "\"", "\"", ":", "p", ".", "ref", ".", "id", ",", "\"", "\"", ":", "encodePape...
// SetPaperSize sets the size of the web page when rendered as a PDF.
[ "SetPaperSize", "sets", "the", "size", "of", "the", "web", "page", "when", "rendered", "as", "a", "PDF", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L601-L604
125,887
benbjohnson/phantomjs
phantomjs.go
ScrollPosition
func (p *WebPage) ScrollPosition() (Position, error) { var resp struct { Top int `json:"top"` Left int `json:"left"` } if err := p.ref.process.doJSON("POST", "/webpage/ScrollPosition", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return Position{}, err } return Position{Top: resp.Top, Left:...
go
func (p *WebPage) ScrollPosition() (Position, error) { var resp struct { Top int `json:"top"` Left int `json:"left"` } if err := p.ref.process.doJSON("POST", "/webpage/ScrollPosition", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return Position{}, err } return Position{Top: resp.Top, Left:...
[ "func", "(", "p", "*", "WebPage", ")", "ScrollPosition", "(", ")", "(", "Position", ",", "error", ")", "{", "var", "resp", "struct", "{", "Top", "int", "`json:\"top\"`", "\n", "Left", "int", "`json:\"left\"`", "\n", "}", "\n", "if", "err", ":=", "p", ...
// ScrollPosition returns the current scroll position of the page.
[ "ScrollPosition", "returns", "the", "current", "scroll", "position", "of", "the", "page", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L618-L627
125,888
benbjohnson/phantomjs
phantomjs.go
SetScrollPosition
func (p *WebPage) SetScrollPosition(pos Position) error { return p.ref.process.doJSON("POST", "/webpage/SetScrollPosition", map[string]interface{}{"ref": p.ref.id, "top": pos.Top, "left": pos.Left}, nil) }
go
func (p *WebPage) SetScrollPosition(pos Position) error { return p.ref.process.doJSON("POST", "/webpage/SetScrollPosition", map[string]interface{}{"ref": p.ref.id, "top": pos.Top, "left": pos.Left}, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetScrollPosition", "(", "pos", "Position", ")", "error", "{", "return", "p", ".", "ref", ".", "process", ".", "doJSON", "(", "\"", "\"", ",", "\"", "\"", ",", "map", "[", "string", "]", "interface", "{", "}"...
// SetScrollPosition sets the current scroll position of the page.
[ "SetScrollPosition", "sets", "the", "current", "scroll", "position", "of", "the", "page", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L630-L632
125,889
benbjohnson/phantomjs
phantomjs.go
Settings
func (p *WebPage) Settings() (WebPageSettings, error) { var resp struct { Settings webPageSettingsJSON `json:"settings"` } if err := p.ref.process.doJSON("POST", "/webpage/Settings", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return WebPageSettings{}, err } return WebPageSettings{ Javascri...
go
func (p *WebPage) Settings() (WebPageSettings, error) { var resp struct { Settings webPageSettingsJSON `json:"settings"` } if err := p.ref.process.doJSON("POST", "/webpage/Settings", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return WebPageSettings{}, err } return WebPageSettings{ Javascri...
[ "func", "(", "p", "*", "WebPage", ")", "Settings", "(", ")", "(", "WebPageSettings", ",", "error", ")", "{", "var", "resp", "struct", "{", "Settings", "webPageSettingsJSON", "`json:\"settings\"`", "\n", "}", "\n", "if", "err", ":=", "p", ".", "ref", ".",...
// Settings returns the settings used on the web page.
[ "Settings", "returns", "the", "settings", "used", "on", "the", "web", "page", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L635-L653
125,890
benbjohnson/phantomjs
phantomjs.go
SetSettings
func (p *WebPage) SetSettings(settings WebPageSettings) error { req := map[string]interface{}{ "ref": p.ref.id, "settings": webPageSettingsJSON{ JavascriptEnabled: settings.JavascriptEnabled, LoadImages: settings.LoadImages, LocalToRemoteURLAccessEnabled: settings.LocalToRem...
go
func (p *WebPage) SetSettings(settings WebPageSettings) error { req := map[string]interface{}{ "ref": p.ref.id, "settings": webPageSettingsJSON{ JavascriptEnabled: settings.JavascriptEnabled, LoadImages: settings.LoadImages, LocalToRemoteURLAccessEnabled: settings.LocalToRem...
[ "func", "(", "p", "*", "WebPage", ")", "SetSettings", "(", "settings", "WebPageSettings", ")", "error", "{", "req", ":=", "map", "[", "string", "]", "interface", "{", "}", "{", "\"", "\"", ":", "p", ".", "ref", ".", "id", ",", "\"", "\"", ":", "w...
// SetSettings sets various settings on the web page. // // The settings apply only during the initial call to the page.open function. // Subsequent modification of the settings object will not have any impact.
[ "SetSettings", "sets", "various", "settings", "on", "the", "web", "page", ".", "The", "settings", "apply", "only", "during", "the", "initial", "call", "to", "the", "page", ".", "open", "function", ".", "Subsequent", "modification", "of", "the", "settings", "...
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L659-L675
125,891
benbjohnson/phantomjs
phantomjs.go
ViewportSize
func (p *WebPage) ViewportSize() (width, height int, err error) { var resp struct { Width int `json:"width"` Height int `json:"height"` } if err := p.ref.process.doJSON("POST", "/webpage/ViewportSize", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return 0, 0, err } return resp.Width, resp.H...
go
func (p *WebPage) ViewportSize() (width, height int, err error) { var resp struct { Width int `json:"width"` Height int `json:"height"` } if err := p.ref.process.doJSON("POST", "/webpage/ViewportSize", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil { return 0, 0, err } return resp.Width, resp.H...
[ "func", "(", "p", "*", "WebPage", ")", "ViewportSize", "(", ")", "(", "width", ",", "height", "int", ",", "err", "error", ")", "{", "var", "resp", "struct", "{", "Width", "int", "`json:\"width\"`", "\n", "Height", "int", "`json:\"height\"`", "\n", "}", ...
// ViewportSize returns the size of the viewport on the browser.
[ "ViewportSize", "returns", "the", "size", "of", "the", "viewport", "on", "the", "browser", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L700-L709
125,892
benbjohnson/phantomjs
phantomjs.go
SetViewportSize
func (p *WebPage) SetViewportSize(width, height int) error { return p.ref.process.doJSON("POST", "/webpage/SetViewportSize", map[string]interface{}{"ref": p.ref.id, "width": width, "height": height}, nil) }
go
func (p *WebPage) SetViewportSize(width, height int) error { return p.ref.process.doJSON("POST", "/webpage/SetViewportSize", map[string]interface{}{"ref": p.ref.id, "width": width, "height": height}, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetViewportSize", "(", "width", ",", "height", "int", ")", "error", "{", "return", "p", ".", "ref", ".", "process", ".", "doJSON", "(", "\"", "\"", ",", "\"", "\"", ",", "map", "[", "string", "]", "interface"...
// SetViewportSize sets the size of the viewport.
[ "SetViewportSize", "sets", "the", "size", "of", "the", "viewport", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L712-L714
125,893
benbjohnson/phantomjs
phantomjs.go
SetZoomFactor
func (p *WebPage) SetZoomFactor(factor float64) error { return p.ref.process.doJSON("POST", "/webpage/SetZoomFactor", map[string]interface{}{"ref": p.ref.id, "value": factor}, nil) }
go
func (p *WebPage) SetZoomFactor(factor float64) error { return p.ref.process.doJSON("POST", "/webpage/SetZoomFactor", map[string]interface{}{"ref": p.ref.id, "value": factor}, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "SetZoomFactor", "(", "factor", "float64", ")", "error", "{", "return", "p", ".", "ref", ".", "process", ".", "doJSON", "(", "\"", "\"", ",", "\"", "\"", ",", "map", "[", "string", "]", "interface", "{", "}", ...
// SetZoomFactor sets the zoom factor when rendering the page.
[ "SetZoomFactor", "sets", "the", "zoom", "factor", "when", "rendering", "the", "page", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L739-L741
125,894
benbjohnson/phantomjs
phantomjs.go
AddCookie
func (p *WebPage) AddCookie(cookie *http.Cookie) (bool, error) { var resp struct { ReturnValue bool `json:"returnValue"` } req := map[string]interface{}{"ref": p.ref.id, "cookie": encodeCookieJSON(cookie)} if err := p.ref.process.doJSON("POST", "/webpage/AddCookie", req, &resp); err != nil { return false, err ...
go
func (p *WebPage) AddCookie(cookie *http.Cookie) (bool, error) { var resp struct { ReturnValue bool `json:"returnValue"` } req := map[string]interface{}{"ref": p.ref.id, "cookie": encodeCookieJSON(cookie)} if err := p.ref.process.doJSON("POST", "/webpage/AddCookie", req, &resp); err != nil { return false, err ...
[ "func", "(", "p", "*", "WebPage", ")", "AddCookie", "(", "cookie", "*", "http", ".", "Cookie", ")", "(", "bool", ",", "error", ")", "{", "var", "resp", "struct", "{", "ReturnValue", "bool", "`json:\"returnValue\"`", "\n", "}", "\n", "req", ":=", "map",...
// AddCookie adds a cookie to the page. // Returns true if the cookie was successfully added.
[ "AddCookie", "adds", "a", "cookie", "to", "the", "page", ".", "Returns", "true", "if", "the", "cookie", "was", "successfully", "added", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L745-L754
125,895
benbjohnson/phantomjs
phantomjs.go
DeleteCookie
func (p *WebPage) DeleteCookie(name string) (bool, error) { var resp struct { ReturnValue bool `json:"returnValue"` } req := map[string]interface{}{"ref": p.ref.id, "name": name} if err := p.ref.process.doJSON("POST", "/webpage/DeleteCookie", req, &resp); err != nil { return false, err } return resp.ReturnVal...
go
func (p *WebPage) DeleteCookie(name string) (bool, error) { var resp struct { ReturnValue bool `json:"returnValue"` } req := map[string]interface{}{"ref": p.ref.id, "name": name} if err := p.ref.process.doJSON("POST", "/webpage/DeleteCookie", req, &resp); err != nil { return false, err } return resp.ReturnVal...
[ "func", "(", "p", "*", "WebPage", ")", "DeleteCookie", "(", "name", "string", ")", "(", "bool", ",", "error", ")", "{", "var", "resp", "struct", "{", "ReturnValue", "bool", "`json:\"returnValue\"`", "\n", "}", "\n", "req", ":=", "map", "[", "string", "...
// DeleteCookie removes a cookie with a matching name. // Returns true if the cookie was successfully deleted.
[ "DeleteCookie", "removes", "a", "cookie", "with", "a", "matching", "name", ".", "Returns", "true", "if", "the", "cookie", "was", "successfully", "deleted", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L768-L777
125,896
benbjohnson/phantomjs
phantomjs.go
EvaluateAsync
func (p *WebPage) EvaluateAsync(script string, delay time.Duration) error { return p.ref.process.doJSON("POST", "/webpage/EvaluateAsync", map[string]interface{}{"ref": p.ref.id, "script": script, "delay": int(delay / time.Millisecond)}, nil) }
go
func (p *WebPage) EvaluateAsync(script string, delay time.Duration) error { return p.ref.process.doJSON("POST", "/webpage/EvaluateAsync", map[string]interface{}{"ref": p.ref.id, "script": script, "delay": int(delay / time.Millisecond)}, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "EvaluateAsync", "(", "script", "string", ",", "delay", "time", ".", "Duration", ")", "error", "{", "return", "p", ".", "ref", ".", "process", ".", "doJSON", "(", "\"", "\"", ",", "\"", "\"", ",", "map", "[", ...
// EvaluateAsync executes a JavaScript function and returns immediately. // Execution is delayed by delay. No value is returned.
[ "EvaluateAsync", "executes", "a", "JavaScript", "function", "and", "returns", "immediately", ".", "Execution", "is", "delayed", "by", "delay", ".", "No", "value", "is", "returned", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L781-L783
125,897
benbjohnson/phantomjs
phantomjs.go
EvaluateJavaScript
func (p *WebPage) EvaluateJavaScript(script string) (interface{}, error) { var resp struct { ReturnValue interface{} `json:"returnValue"` } if err := p.ref.process.doJSON("POST", "/webpage/EvaluateJavaScript", map[string]interface{}{"ref": p.ref.id, "script": script}, &resp); err != nil { return nil, err } ret...
go
func (p *WebPage) EvaluateJavaScript(script string) (interface{}, error) { var resp struct { ReturnValue interface{} `json:"returnValue"` } if err := p.ref.process.doJSON("POST", "/webpage/EvaluateJavaScript", map[string]interface{}{"ref": p.ref.id, "script": script}, &resp); err != nil { return nil, err } ret...
[ "func", "(", "p", "*", "WebPage", ")", "EvaluateJavaScript", "(", "script", "string", ")", "(", "interface", "{", "}", ",", "error", ")", "{", "var", "resp", "struct", "{", "ReturnValue", "interface", "{", "}", "`json:\"returnValue\"`", "\n", "}", "\n", ...
// EvaluateJavaScript executes a JavaScript function. // Returns the value returned by the function.
[ "EvaluateJavaScript", "executes", "a", "JavaScript", "function", ".", "Returns", "the", "value", "returned", "by", "the", "function", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L787-L795
125,898
benbjohnson/phantomjs
phantomjs.go
Page
func (p *WebPage) Page(name string) (*WebPage, error) { var resp struct { Ref refJSON `json:"ref"` } if err := p.ref.process.doJSON("POST", "/webpage/Page", map[string]interface{}{"ref": p.ref.id, "name": name}, &resp); err != nil { return nil, err } if resp.Ref.ID == "" { return nil, nil } return &WebPage...
go
func (p *WebPage) Page(name string) (*WebPage, error) { var resp struct { Ref refJSON `json:"ref"` } if err := p.ref.process.doJSON("POST", "/webpage/Page", map[string]interface{}{"ref": p.ref.id, "name": name}, &resp); err != nil { return nil, err } if resp.Ref.ID == "" { return nil, nil } return &WebPage...
[ "func", "(", "p", "*", "WebPage", ")", "Page", "(", "name", "string", ")", "(", "*", "WebPage", ",", "error", ")", "{", "var", "resp", "struct", "{", "Ref", "refJSON", "`json:\"ref\"`", "\n", "}", "\n", "if", "err", ":=", "p", ".", "ref", ".", "p...
// Page returns an owned page by window name. // Returns nil if the page cannot be found.
[ "Page", "returns", "an", "owned", "page", "by", "window", "name", ".", "Returns", "nil", "if", "the", "page", "cannot", "be", "found", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L811-L822
125,899
benbjohnson/phantomjs
phantomjs.go
Go
func (p *WebPage) Go(index int) error { return p.ref.process.doJSON("POST", "/webpage/Go", map[string]interface{}{"ref": p.ref.id, "index": index}, nil) }
go
func (p *WebPage) Go(index int) error { return p.ref.process.doJSON("POST", "/webpage/Go", map[string]interface{}{"ref": p.ref.id, "index": index}, nil) }
[ "func", "(", "p", "*", "WebPage", ")", "Go", "(", "index", "int", ")", "error", "{", "return", "p", ".", "ref", ".", "process", ".", "doJSON", "(", "\"", "\"", ",", "\"", "\"", ",", "map", "[", "string", "]", "interface", "{", "}", "{", "\"", ...
// Go navigates to the page in history by relative offset. // A positive index moves forward, a negative index moves backwards.
[ "Go", "navigates", "to", "the", "page", "in", "history", "by", "relative", "offset", ".", "A", "positive", "index", "moves", "forward", "a", "negative", "index", "moves", "backwards", "." ]
6499a20f5cd6e4264994b4d95e49b6f21aafef79
https://github.com/benbjohnson/phantomjs/blob/6499a20f5cd6e4264994b4d95e49b6f21aafef79/phantomjs.go#L836-L838