Documentation
¶
Overview ¶
Package browser is the main entry point for Gost, helping create a window initialized with a script enging, connected to a server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Browser ¶
type Browser struct { Client http.Client ScriptHost ScriptHost // contains filtered or unexported fields }
Pretty stupid right now, but should _probably_ allow handling multiple windows/tabs. This used to be the case for _some_ identity providers, but I'm not sure if that even work anymore because of browser security.
func NewBrowser ¶
func NewBrowser() *Browser
NewBrowser should not be called. Call New instead.
This method will selfdestruct in 10 commits
func NewBrowserFromHandler ¶
NewBrowserFromHandler should not be called, call, NewFromHandler instead.
This method will selfdestruct in 10 commits
func NewFromHandler ¶
NewFromHandler initialises a new Browser with the default script engine and sets up the internal http.Client used with an http.Roundtripper that bypasses the TCP stack and calls directly into the
Note: There is a current limitation that NO requests from the browser will be sent when using this. So sites will not work if they
- Depend on content from CDN
- Depend on an external service, e.g., an identity provider.
That is a limitation that was the result of prioritising more important, and higher risk features.
func (*Browser) Open ¶
Open will open a new html.Window, loading the specified location. If the server does not respons with a 200 status code, an error is returned.
See html.NewWindowReader about the return value, and when the window returns.
Directories
¶
Path | Synopsis |
---|---|
browser
module
|
|
Package dom provides the fundamental DOM implementation for Gost-DOM.
|
Package dom provides the fundamental DOM implementation for Gost-DOM. |
Package html works on top of the DOM to implement specific HTML elements.
|
Package html works on top of the DOM to implement specific HTML elements. |
internal
|
|
clock
Package clock provides a simulated time for Gost-DOM.
|
Package clock provides a simulated time for Gost-DOM. |
constants
Package constants is a collection of values that are used many times in the implementation, but has no relevance to users of the library, e.g., a link to where you can file an issue when you encounter a not-implemented feature; or a feature that is not fully implemented, e.g.
|
Package constants is a collection of values that are used many times in the implementation, but has no relevance to users of the library, e.g., a link to where you can file an issue when you encounter a not-implemented feature; or a feature that is not fully implemented, e.g. |
interfaces
Package interfaces is an internal package containing generated go interfaces
|
Package interfaces is an internal package containing generated go interfaces |
interfaces/url-interfaces
Package urlinterfaces contains internal code representing the IDL interfaces in the URL API
[URL API]: https://developer.mozilla.org/en-US/docs/Web/API/URL_API
|
Package urlinterfaces contains internal code representing the IDL interfaces in the URL API [URL API]: https://developer.mozilla.org/en-US/docs/Web/API/URL_API |
log
Package log contains functions used internally for logging to a default logger implementing slog.Logger.
|
Package log contains functions used internally for logging to a default logger implementing slog.Logger. |
test/scripttests
Package scripttests contains a specification of the behaviour of client-side scripting.
|
Package scripttests contains a specification of the behaviour of client-side scripting. |
testing/gomega-matchers
Package gomegamatchers just exposes gomega matchers for easier importing.
|
Package gomegamatchers just exposes gomega matchers for easier importing. |
Package logger provides the basic functionality of supplying a custom logger.
|
Package logger provides the basic functionality of supplying a custom logger. |
gojahost
The gojahost package provides functionality to execute client-scripts in gost-dom.
|
The gojahost package provides functionality to execute client-scripts in gost-dom. |
v8host
The v8host packages provides functionality to execute client-side scripts in gost-dom.
|
The v8host packages provides functionality to execute client-side scripts in gost-dom. |
testing
|
|
gomega-matchers
Package matchers contains custom matches for use with the [Gomega] assertion library.
|
Package matchers contains custom matches for use with the [Gomega] assertion library. |
Package url contains types defined in the url web IDL spec.
|
Package url contains types defined in the url web IDL spec. |