Documentation
¶
Index ¶
- func CloseDocument() (ret js.Promise[js.Void])
- func CreateDocument(parameters CreateParameters) (ret js.Promise[js.Void])
- func FuncCloseDocument() (fn js.Func[func() js.Promise[js.Void]])
- func FuncCreateDocument() (fn js.Func[func(parameters CreateParameters) js.Promise[js.Void]])
- func FuncHasDocument() (fn js.Func[func() js.Promise[js.Boolean]])
- func HasDocument() (ret js.Promise[js.Boolean])
- func HasFuncCloseDocument() bool
- func HasFuncCreateDocument() bool
- func HasFuncHasDocument() bool
- func TryCloseDocument() (ret js.Promise[js.Void], exception js.Any, ok bool)
- func TryCreateDocument(parameters CreateParameters) (ret js.Promise[js.Void], exception js.Any, ok bool)
- func TryHasDocument() (ret js.Promise[js.Boolean], exception js.Any, ok bool)
- type BooleanCallback
- type BooleanCallbackFunc
- type CreateParameters
- type Reason
- type VoidCallback
- type VoidCallbackFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseDocument ¶
CloseDocument calls the function "WEBEXT.offscreen.closeDocument" directly.
func CreateDocument ¶
func CreateDocument(parameters CreateParameters) (ret js.Promise[js.Void])
CreateDocument calls the function "WEBEXT.offscreen.createDocument" directly.
func FuncCloseDocument ¶
FuncCloseDocument returns the function "WEBEXT.offscreen.closeDocument".
func FuncCreateDocument ¶
FuncCreateDocument returns the function "WEBEXT.offscreen.createDocument".
func FuncHasDocument ¶
FuncHasDocument returns the function "WEBEXT.offscreen.hasDocument".
func HasDocument ¶
HasDocument calls the function "WEBEXT.offscreen.hasDocument" directly.
func HasFuncCloseDocument ¶
func HasFuncCloseDocument() bool
HasFuncCloseDocument returns true if the function "WEBEXT.offscreen.closeDocument" exists.
func HasFuncCreateDocument ¶
func HasFuncCreateDocument() bool
HasFuncCreateDocument returns true if the function "WEBEXT.offscreen.createDocument" exists.
func HasFuncHasDocument ¶
func HasFuncHasDocument() bool
HasFuncHasDocument returns true if the function "WEBEXT.offscreen.hasDocument" exists.
func TryCloseDocument ¶
TryCloseDocument calls the function "WEBEXT.offscreen.closeDocument" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
func TryCreateDocument ¶
func TryCreateDocument(parameters CreateParameters) (ret js.Promise[js.Void], exception js.Any, ok bool)
TryCreateDocument calls the function "WEBEXT.offscreen.createDocument" in a try/catch block and returns (_, err, ok = false) when it went through the catch clause.
Types ¶
type BooleanCallback ¶
func (*BooleanCallback[T]) DispatchCallback ¶
func (cb *BooleanCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type BooleanCallbackFunc ¶
func (BooleanCallbackFunc) DispatchCallback ¶
func (fn BooleanCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
type CreateParameters ¶
type CreateParameters struct {
// Reasons is "CreateParameters.reasons"
//
// Optional
Reasons js.Array[Reason]
// Url is "CreateParameters.url"
//
// Optional
Url js.String
// Justification is "CreateParameters.justification"
//
// Optional
Justification js.String
FFI_USE bool
}
func (*CreateParameters) FreeMembers ¶
func (p *CreateParameters) FreeMembers(recursive bool)
FreeMembers frees fields with heap reference, if recursive is true free all heap references reachable from p.
func (CreateParameters) FromRef ¶
func (p CreateParameters) FromRef(ref js.Ref) CreateParameters
FromRef calls UpdateFrom and returns a CreateParameters with all fields set.
func (CreateParameters) New ¶
func (p CreateParameters) New() js.Ref
New creates a new CreateParameters in the application heap.
func (*CreateParameters) Update ¶
func (p *CreateParameters) Update(ref js.Ref)
Update writes all fields of the p to the heap object referenced by ref.
func (*CreateParameters) UpdateFrom ¶
func (p *CreateParameters) UpdateFrom(ref js.Ref)
UpdateFrom copies value of all fields of the heap object to p.
type Reason ¶
type Reason uint32
const ( Reason_TESTING Reason Reason_AUDIO_PLAYBACK Reason_IFRAME_SCRIPTING Reason_DOM_SCRAPING Reason_BLOBS Reason_DOM_PARSER Reason_USER_MEDIA Reason_DISPLAY_MEDIA Reason_WEB_RTC Reason_CLIPBOARD Reason_LOCAL_STORAGE Reason_WORKERS Reason_BATTERY_STATUS Reason_MATCH_MEDIA Reason_GEOLOCATION )
type VoidCallback ¶
func (*VoidCallback[T]) DispatchCallback ¶
func (cb *VoidCallback[T]) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (*VoidCallback[T]) Register ¶
func (cb *VoidCallback[T]) Register() js.Func[func()]
type VoidCallbackFunc ¶
func (VoidCallbackFunc) DispatchCallback ¶
func (fn VoidCallbackFunc) DispatchCallback( targetPC uintptr, ctx *js.CallbackContext, )
func (VoidCallbackFunc) Register ¶
func (fn VoidCallbackFunc) Register() js.Func[func()]