NewContext returns a new [Context] with basic defaults.
()
| 59 | |
| 60 | // NewContext returns a new [Context] with basic defaults. |
| 61 | func 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. |
no outgoing calls