webapi: github.com/gowebapi/webapi/dom/permissions Index | Files

package permissions

import "github.com/gowebapi/webapi/dom/permissions"

Package permissions is a common infrastructure to interact with browser permissions.

Index

Package Files

doc.go permissions.go

Constants

const (
    GeolocationPermissionName        = "geolocation"
    NotificationsPermissionName      = "notifications"
    PushPermissionName               = "push"
    MidiPermissionName               = "midi"
    CameraPermissionName             = "camera"
    MicrophonePermissionName         = "microphone"
    SpeakerPermissionName            = "speaker"
    DevicePermissionName             = "device-info"
    BackgroundFetchPermissionName    = "background-fetch"
    BackgroundSyncPermissionName     = "background-sync"
    BluetoothPermissionName          = "bluetooth"
    PersistentStoragePermissionName  = "persistent-storage"
    AmbientLightSensorPermissionName = "ambient-light-sensor"
    AccelerometerPermissionName      = "accelerometer"
    GyroscopePermissionName          = "gyroscope"
    MagnetometerPermissionName       = "magnetometer"
    ClipboardPermissionName          = "clipboard"
    DisplayPermissionName            = "display"
)

type DevicePermissionDescriptor Uses

type DevicePermissionDescriptor struct {
    Name     string
    DeviceId string
}

dictionary: DevicePermissionDescriptor

func DevicePermissionDescriptorFromJS Uses

func DevicePermissionDescriptorFromJS(value js.Wrapper) *DevicePermissionDescriptor

DevicePermissionDescriptorFromJS is allocating a new DevicePermissionDescriptor object and copy all values from input javascript object

func (*DevicePermissionDescriptor) JSValue Uses

func (_this *DevicePermissionDescriptor) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type MidiPermissionDescriptor Uses

type MidiPermissionDescriptor struct {
    Name  string
    Sysex bool
}

dictionary: MidiPermissionDescriptor

func MidiPermissionDescriptorFromJS Uses

func MidiPermissionDescriptorFromJS(value js.Wrapper) *MidiPermissionDescriptor

MidiPermissionDescriptorFromJS is allocating a new MidiPermissionDescriptor object and copy all values from input javascript object

func (*MidiPermissionDescriptor) JSValue Uses

func (_this *MidiPermissionDescriptor) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type PermissionDescriptor Uses

type PermissionDescriptor struct {
    Name string
}

dictionary: PermissionDescriptor

func PermissionDescriptorFromJS Uses

func PermissionDescriptorFromJS(value js.Wrapper) *PermissionDescriptor

PermissionDescriptorFromJS is allocating a new PermissionDescriptor object and copy all values from input javascript object

func (*PermissionDescriptor) JSValue Uses

func (_this *PermissionDescriptor) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type PermissionSetParameters Uses

type PermissionSetParameters struct {
    Descriptor *PermissionDescriptor
    State      PermissionState
    OneRealm   bool
}

dictionary: PermissionSetParameters

func PermissionSetParametersFromJS Uses

func PermissionSetParametersFromJS(value js.Wrapper) *PermissionSetParameters

PermissionSetParametersFromJS is allocating a new PermissionSetParameters object and copy all values from input javascript object

func (*PermissionSetParameters) JSValue Uses

func (_this *PermissionSetParameters) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type PermissionState Uses

type PermissionState int

enum: PermissionState

const (
    GrantedPermissionState PermissionState = iota
    DeniedPermissionState
    PromptPermissionState
)

func PermissionStateFromJS Uses

func PermissionStateFromJS(value js.Value) PermissionState

PermissionStateFromJS is converting a javascript value into a PermissionState enum value.

func (*PermissionState) JSValue Uses

func (this *PermissionState) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (PermissionState) Value Uses

func (this PermissionState) Value() string

Value is converting this into javascript defined string value

type PermissionStatus Uses

type PermissionStatus struct {
    domcore.EventTarget
}

class: PermissionStatus

func PermissionStatusFromJS Uses

func PermissionStatusFromJS(value js.Wrapper) *PermissionStatus

PermissionStatusFromJS is casting a js.Wrapper into PermissionStatus.

func (*PermissionStatus) AddEventChange Uses

func (_this *PermissionStatus) AddEventChange(listener func(event *domcore.Event, currentTarget *PermissionStatus)) js.Func

AddChange is adding doing AddEventListener for 'Change' on target. This method is returning allocated javascript function that need to be released.

func (*PermissionStatus) OnChange Uses

func (_this *PermissionStatus) OnChange() domcore.EventHandlerFunc

OnChange returning attribute 'onchange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*PermissionStatus) SetOnChange Uses

func (_this *PermissionStatus) SetOnChange(listener func(event *domcore.Event, currentTarget *PermissionStatus)) js.Func

SetOnChange is assigning a function to 'onchange'. This This method is returning allocated javascript function that need to be released.

func (*PermissionStatus) State Uses

func (_this *PermissionStatus) State() PermissionState

State returning attribute 'state' with type PermissionState (idl: PermissionState).

type Permissions Uses

type Permissions struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: Permissions

func PermissionsFromJS Uses

func PermissionsFromJS(value js.Wrapper) *Permissions

PermissionsFromJS is casting a js.Wrapper into Permissions.

func (*Permissions) JSValue Uses

func (_this *Permissions) JSValue() js.Value

func (*Permissions) Query Uses

func (_this *Permissions) Query(permissionDesc *javascript.Object) (_result *PromisePermissionStatus)

type PromisePermissionStatus Uses

type PromisePermissionStatus struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: Promise

func PromisePermissionStatusFromJS Uses

func PromisePermissionStatusFromJS(value js.Wrapper) *PromisePermissionStatus

PromisePermissionStatusFromJS is casting a js.Wrapper into PromisePermissionStatus.

func (*PromisePermissionStatus) Catch Uses

func (_this *PromisePermissionStatus) Catch(onRejected *PromisePermissionStatusOnRejected) (_result *PromisePermissionStatus)

func (*PromisePermissionStatus) Finally Uses

func (_this *PromisePermissionStatus) Finally(onFinally *javascript.PromiseFinally) (_result *PromisePermissionStatus)

func (*PromisePermissionStatus) JSValue Uses

func (_this *PromisePermissionStatus) JSValue() js.Value

func (*PromisePermissionStatus) Then Uses

func (_this *PromisePermissionStatus) Then(onFulfilled *PromisePermissionStatusOnFulfilled, onRejected *PromisePermissionStatusOnRejected) (_result *PromisePermissionStatus)

type PromisePermissionStatusOnFulfilled Uses

type PromisePermissionStatusOnFulfilled js.Func

PromisePermissionStatusOnFulfilled is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromisePermissionStatusOnFulfilledToJS Uses

func PromisePermissionStatusOnFulfilledToJS(callback PromisePermissionStatusOnFulfilledFunc) *PromisePermissionStatusOnFulfilled

type PromisePermissionStatusOnFulfilledFunc Uses

type PromisePermissionStatusOnFulfilledFunc func(value *PermissionStatus)

callback: PromiseTemplateOnFulfilled

func PromisePermissionStatusOnFulfilledFromJS Uses

func PromisePermissionStatusOnFulfilledFromJS(_value js.Value) PromisePermissionStatusOnFulfilledFunc

type PromisePermissionStatusOnRejected Uses

type PromisePermissionStatusOnRejected js.Func

PromisePermissionStatusOnRejected is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromisePermissionStatusOnRejectedToJS Uses

func PromisePermissionStatusOnRejectedToJS(callback PromisePermissionStatusOnRejectedFunc) *PromisePermissionStatusOnRejected

type PromisePermissionStatusOnRejectedFunc Uses

type PromisePermissionStatusOnRejectedFunc func(reason js.Value)

callback: PromiseTemplateOnRejected

func PromisePermissionStatusOnRejectedFromJS Uses

func PromisePermissionStatusOnRejectedFromJS(_value js.Value) PromisePermissionStatusOnRejectedFunc

type PushPermissionDescriptor Uses

type PushPermissionDescriptor struct {
    Name            string
    UserVisibleOnly bool
}

dictionary: PushPermissionDescriptor

func PushPermissionDescriptorFromJS Uses

func PushPermissionDescriptorFromJS(value js.Wrapper) *PushPermissionDescriptor

PushPermissionDescriptorFromJS is allocating a new PushPermissionDescriptor object and copy all values from input javascript object

func (*PushPermissionDescriptor) JSValue Uses

func (_this *PushPermissionDescriptor) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type Union Uses

type Union struct {
    Value js.Value
}

func UnionFromJS Uses

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue Uses

func (u *Union) JSValue() js.Value

Package permissions imports 3 packages (graph) and is imported by 4 packages. Updated 2019-09-16. Refresh now. Tools for package owners.