MCPcopy Create free account
hub / github.com/cogentcore/core / NewContext

Function NewContext

htmlcore/context.go:61–67  ·  view source on GitHub ↗

NewContext returns a new [Context] with basic defaults.

()

Source from the content-addressed store, hash-verified

59
60// NewContext returns a new [Context] with basic defaults.
61func NewContext() *Context {
62 return &Context{
63 styles: map[*html.Node][]*css.Rule{},
64 OpenURL: system.TheApp.OpenURL,
65 GetURL: http.Get,
66 }
67}
68
69// Parent returns the current parent widget that a widget
70// associated with the current node should be added to.

Callers 7

mainFunction · 0.92
mainFunction · 0.92
InitMethod · 0.92
TestInlineContainerFunction · 0.70
TestNoInlineContainerFunction · 0.70
TestHTMLFunction · 0.70
TestMDFunction · 0.70

Calls

no outgoing calls

Tested by 4

TestInlineContainerFunction · 0.56
TestNoInlineContainerFunction · 0.56
TestHTMLFunction · 0.56
TestMDFunction · 0.56