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

Method SetContent

pages/page.go:249–251  ·  view source on GitHub ↗

SetContent is a helper function that calls [Page.SetSource] with the "content" subdirectory of the given filesystem.

(content fs.FS)

Source from the content-addressed store, hash-verified

247// SetContent is a helper function that calls [Page.SetSource]
248// with the "content" subdirectory of the given filesystem.
249func (pg *Page) SetContent(content fs.FS) *Page {
250 return pg.SetSource(fsx.Sub(content, "content"))
251}
252
253// OpenURL sets the content of the page from the given url. If the given URL
254// has no scheme (eg: "/about"), then it sets the content of the page to the

Callers 2

mainFunction · 0.80
mainFunction · 0.80

Calls 2

SetSourceMethod · 0.95
SubFunction · 0.92

Tested by

no test coverage detected