Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
2113 lines (1903 sloc) 53.2 KB
// Code generated by webidl-bind. DO NOT EDIT.
// +build !js
package performance
import js "github.com/gowebapi/webapi/core/js"
import (
"github.com/gowebapi/webapi/dom/domcore"
"github.com/gowebapi/webapi/javascript"
)
// using following types:
// domcore.Event
// domcore.EventHandler
// domcore.EventTarget
// javascript.FrozenArray
// javascript.Object
// source idl files:
// event-timing.idl
// hr-time.idl
// longtasks.idl
// navigation-timing.idl
// paint-timing.idl
// performance-timeline.idl
// resource-timing.idl
// server-timing.idl
// user-timing.idl
// transform files:
// event-timing.go.md
// hr-time.go.md
// longtasks.go.md
// navigation-timing.go.md
// paint-timing.go.md
// performance-timeline.go.md
// resource-timing.go.md
// server-timing.go.md
// user-timing.go.md
// workaround for compiler error
func unused(value interface{}) {
// TODO remove this method
}
type Union struct {
Value js.Value
}
func (u *Union) JSValue() js.Value {
return u.Value
}
func UnionFromJS(value js.Value) *Union {
return &Union{Value: value}
}
// enum: NavigationType
type NavigationType int
const (
NavigateNavigationType NavigationType = iota
ReloadNavigationType
BackForwardNavigationType
PrerenderNavigationType
)
var navigationTypeToWasmTable = []string{
"navigate", "reload", "back_forward", "prerender",
}
var navigationTypeFromWasmTable = map[string]NavigationType{
"navigate": NavigateNavigationType, "reload": ReloadNavigationType, "back_forward": BackForwardNavigationType, "prerender": PrerenderNavigationType,
}
// JSValue is converting this enum into a javascript object
func (this *NavigationType) JSValue() js.Value {
return js.ValueOf(this.Value())
}
// Value is converting this into javascript defined
// string value
func (this NavigationType) Value() string {
idx := int(this)
if idx >= 0 && idx < len(navigationTypeToWasmTable) {
return navigationTypeToWasmTable[idx]
}
panic("unknown input value")
}
// NavigationTypeFromJS is converting a javascript value into
// a NavigationType enum value.
func NavigationTypeFromJS(value js.Value) NavigationType {
key := value.String()
conv, ok := navigationTypeFromWasmTable[key]
if !ok {
panic("unable to convert '" + key + "'")
}
return conv
}
// callback: EventCountsForEach
type EventCountsForEachFunc func(currentValue uint, currentKey string, listObj *EventCounts)
// EventCountsForEach is a javascript function type.
//
// Call Release() when done to release resouces
// allocated to this type.
type EventCountsForEach js.Func
func EventCountsForEachToJS(callback EventCountsForEachFunc) *EventCountsForEach {
if callback == nil {
return nil
}
ret := EventCountsForEach(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
var (
_p0 uint // javascript: unsigned long currentValue
_p1 string // javascript: DOMString currentKey
_p2 *EventCounts // javascript: EventCounts listObj
)
_p0 = (uint)((args[0]).Int())
_p1 = (args[1]).String()
_p2 = EventCountsFromJS(args[2])
callback(_p0, _p1, _p2)
// returning no return value
return nil
}))
return &ret
}
func EventCountsForEachFromJS(_value js.Value) EventCountsForEachFunc {
return func(currentValue uint, currentKey string, listObj *EventCounts) {
var (
_args [3]interface{}
_end int
)
_p0 := currentValue
_args[0] = _p0
_end++
_p1 := currentKey
_args[1] = _p1
_end++
_p2 := listObj.JSValue()
_args[2] = _p2
_end++
_value.Invoke(_args[0:_end]...)
return
}
}
// callback: PerformanceObserverCallback
type ObserverCallbackFunc func(entries *ObserverEntryList, observer *Observer)
// ObserverCallback is a javascript function type.
//
// Call Release() when done to release resouces
// allocated to this type.
type ObserverCallback js.Func
func ObserverCallbackToJS(callback ObserverCallbackFunc) *ObserverCallback {
if callback == nil {
return nil
}
ret := ObserverCallback(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
var (
_p0 *ObserverEntryList // javascript: PerformanceObserverEntryList entries
_p1 *Observer // javascript: PerformanceObserver observer
)
_p0 = ObserverEntryListFromJS(args[0])
_p1 = ObserverFromJS(args[1])
callback(_p0, _p1)
// returning no return value
return nil
}))
return &ret
}
func ObserverCallbackFromJS(_value js.Value) ObserverCallbackFunc {
return func(entries *ObserverEntryList, observer *Observer) {
var (
_args [2]interface{}
_end int
)
_p0 := entries.JSValue()
_args[0] = _p0
_end++
_p1 := observer.JSValue()
_args[1] = _p1
_end++
_value.Invoke(_args[0:_end]...)
return
}
}
// dictionary: EventCountsEntryIteratorValue
type EventCountsEntryIteratorValue struct {
Value []js.Value
Done bool
}
// JSValue is allocating a new javasript object and copy
// all values
func (_this *EventCountsEntryIteratorValue) JSValue() js.Value {
out := js.Global().Get("Object").New()
value0 := js.Global().Get("Array").New(len(_this.Value))
for __idx0, __seq_in0 := range _this.Value {
__seq_out0 := __seq_in0
value0.SetIndex(__idx0, __seq_out0)
}
out.Set("value", value0)
value1 := _this.Done
out.Set("done", value1)
return out
}
// EventCountsEntryIteratorValueFromJS is allocating a new
// EventCountsEntryIteratorValue object and copy all values from
// input javascript object
func EventCountsEntryIteratorValueFromJS(value js.Wrapper) *EventCountsEntryIteratorValue {
input := value.JSValue()
var out EventCountsEntryIteratorValue
var (
value0 []js.Value // javascript: sequence<any> {value Value value}
value1 bool // javascript: boolean {done Done done}
)
__length0 := input.Get("value").Length()
__array0 := make([]js.Value, __length0, __length0)
for __idx0 := 0; __idx0 < __length0; __idx0++ {
var __seq_out0 js.Value
__seq_in0 := input.Get("value").Index(__idx0)
__seq_out0 = __seq_in0
__array0[__idx0] = __seq_out0
}
value0 = __array0
out.Value = value0
value1 = (input.Get("done")).Bool()
out.Done = value1
return &out
}
// dictionary: EventCountsKeyIteratorValue
type EventCountsKeyIteratorValue struct {
Value string
Done bool
}
// JSValue is allocating a new javasript object and copy
// all values
func (_this *EventCountsKeyIteratorValue) JSValue() js.Value {
out := js.Global().Get("Object").New()
value0 := _this.Value
out.Set("value", value0)
value1 := _this.Done
out.Set("done", value1)
return out
}
// EventCountsKeyIteratorValueFromJS is allocating a new
// EventCountsKeyIteratorValue object and copy all values from
// input javascript object
func EventCountsKeyIteratorValueFromJS(value js.Wrapper) *EventCountsKeyIteratorValue {
input := value.JSValue()
var out EventCountsKeyIteratorValue
var (
value0 string // javascript: DOMString {value Value value}
value1 bool // javascript: boolean {done Done done}
)
value0 = (input.Get("value")).String()
out.Value = value0
value1 = (input.Get("done")).Bool()
out.Done = value1
return &out
}
// dictionary: EventCountsValueIteratorValue
type EventCountsValueIteratorValue struct {
Value uint
Done bool
}
// JSValue is allocating a new javasript object and copy
// all values
func (_this *EventCountsValueIteratorValue) JSValue() js.Value {
out := js.Global().Get("Object").New()
value0 := _this.Value
out.Set("value", value0)
value1 := _this.Done
out.Set("done", value1)
return out
}
// EventCountsValueIteratorValueFromJS is allocating a new
// EventCountsValueIteratorValue object and copy all values from
// input javascript object
func EventCountsValueIteratorValueFromJS(value js.Wrapper) *EventCountsValueIteratorValue {
input := value.JSValue()
var out EventCountsValueIteratorValue
var (
value0 uint // javascript: unsigned long {value Value value}
value1 bool // javascript: boolean {done Done done}
)
value0 = (uint)((input.Get("value")).Int())
out.Value = value0
value1 = (input.Get("done")).Bool()
out.Done = value1
return &out
}
// dictionary: PerformanceMarkOptions
type MarkOptions struct {
Detail js.Value
StartTime float64
}
// JSValue is allocating a new javasript object and copy
// all values
func (_this *MarkOptions) JSValue() js.Value {
out := js.Global().Get("Object").New()
value0 := _this.Detail
out.Set("detail", value0)
value1 := _this.StartTime
out.Set("startTime", value1)
return out
}
// MarkOptionsFromJS is allocating a new
// MarkOptions object and copy all values from
// input javascript object
func MarkOptionsFromJS(value js.Wrapper) *MarkOptions {
input := value.JSValue()
var out MarkOptions
var (
value0 js.Value // javascript: any {detail Detail detail}
value1 float64 // javascript: double {startTime StartTime startTime}
)
value0 = input.Get("detail")
out.Detail = value0
value1 = (input.Get("startTime")).Float()
out.StartTime = value1
return &out
}
// dictionary: PerformanceMeasureOptions
type MeasureOptions struct {
Detail js.Value
StartTime *Union
Duration float64
EndTime *Union
}
// JSValue is allocating a new javasript object and copy
// all values
func (_this *MeasureOptions) JSValue() js.Value {
out := js.Global().Get("Object").New()
value0 := _this.Detail
out.Set("detail", value0)
value1 := _this.StartTime.JSValue()
out.Set("startTime", value1)
value2 := _this.Duration
out.Set("duration", value2)
value3 := _this.EndTime.JSValue()
out.Set("endTime", value3)
return out
}
// MeasureOptionsFromJS is allocating a new
// MeasureOptions object and copy all values from
// input javascript object
func MeasureOptionsFromJS(value js.Wrapper) *MeasureOptions {
input := value.JSValue()
var out MeasureOptions
var (
value0 js.Value // javascript: any {detail Detail detail}
value1 *Union // javascript: Union {startTime StartTime startTime}
value2 float64 // javascript: double {duration Duration duration}
value3 *Union // javascript: Union {endTime EndTime endTime}
)
value0 = input.Get("detail")
out.Detail = value0
value1 = UnionFromJS(input.Get("startTime"))
out.StartTime = value1
value2 = (input.Get("duration")).Float()
out.Duration = value2
value3 = UnionFromJS(input.Get("endTime"))
out.EndTime = value3
return &out
}
// dictionary: PerformanceObserverInit
type ObserverInit struct {
EntryTypes []string
Type string
Buffered bool
}
// JSValue is allocating a new javasript object and copy
// all values
func (_this *ObserverInit) JSValue() js.Value {
out := js.Global().Get("Object").New()
value0 := js.Global().Get("Array").New(len(_this.EntryTypes))
for __idx0, __seq_in0 := range _this.EntryTypes {
__seq_out0 := __seq_in0
value0.SetIndex(__idx0, __seq_out0)
}
out.Set("entryTypes", value0)
value1 := _this.Type
out.Set("type", value1)
value2 := _this.Buffered
out.Set("buffered", value2)
return out
}
// ObserverInitFromJS is allocating a new
// ObserverInit object and copy all values from
// input javascript object
func ObserverInitFromJS(value js.Wrapper) *ObserverInit {
input := value.JSValue()
var out ObserverInit
var (
value0 []string // javascript: sequence<DOMString> {entryTypes EntryTypes entryTypes}
value1 string // javascript: DOMString {type Type _type}
value2 bool // javascript: boolean {buffered Buffered buffered}
)
__length0 := input.Get("entryTypes").Length()
__array0 := make([]string, __length0, __length0)
for __idx0 := 0; __idx0 < __length0; __idx0++ {
var __seq_out0 string
__seq_in0 := input.Get("entryTypes").Index(__idx0)
__seq_out0 = (__seq_in0).String()
__array0[__idx0] = __seq_out0
}
value0 = __array0
out.EntryTypes = value0
value1 = (input.Get("type")).String()
out.Type = value1
value2 = (input.Get("buffered")).Bool()
out.Buffered = value2
return &out
}
// class: PerformanceEntry
type Entry struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *Entry) JSValue() js.Value {
return _this.Value_JS
}
// EntryFromJS is casting a js.Wrapper into Entry.
func EntryFromJS(value js.Wrapper) *Entry {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &Entry{}
ret.Value_JS = input
return ret
}
// Name returning attribute 'name' with
// type string (idl: DOMString).
func (_this *Entry) Name() string {
var ret string
value := _this.Value_JS.Get("name")
ret = (value).String()
return ret
}
// EntryType returning attribute 'entryType' with
// type string (idl: DOMString).
func (_this *Entry) EntryType() string {
var ret string
value := _this.Value_JS.Get("entryType")
ret = (value).String()
return ret
}
// StartTime returning attribute 'startTime' with
// type float64 (idl: double).
func (_this *Entry) StartTime() float64 {
var ret float64
value := _this.Value_JS.Get("startTime")
ret = (value).Float()
return ret
}
// Duration returning attribute 'duration' with
// type float64 (idl: double).
func (_this *Entry) Duration() float64 {
var ret float64
value := _this.Value_JS.Get("duration")
ret = (value).Float()
return ret
}
func (_this *Entry) ToJSON() (_result *javascript.Object) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("toJSON", _args[0:_end]...)
var (
_converted *javascript.Object // javascript: object _what_return_name
)
_converted = javascript.ObjectFromJS(_returned)
_result = _converted
return
}
// class: EventCounts
type EventCounts struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *EventCounts) JSValue() js.Value {
return _this.Value_JS
}
// EventCountsFromJS is casting a js.Wrapper into EventCounts.
func EventCountsFromJS(value js.Wrapper) *EventCounts {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &EventCounts{}
ret.Value_JS = input
return ret
}
// Size returning attribute 'size' with
// type int (idl: long).
func (_this *EventCounts) Size() int {
var ret int
value := _this.Value_JS.Get("size")
ret = (value).Int()
return ret
}
func (_this *EventCounts) Entries() (_result *EventCountsEntryIterator) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("entries", _args[0:_end]...)
var (
_converted *EventCountsEntryIterator // javascript: EventCountsEntryIterator _what_return_name
)
_converted = EventCountsEntryIteratorFromJS(_returned)
_result = _converted
return
}
func (_this *EventCounts) ForEach(callback *EventCountsForEach, optionalThisForCallbackArgument interface{}) {
var (
_args [2]interface{}
_end int
)
var __callback0 js.Value
if callback != nil {
__callback0 = (*callback).Value
} else {
__callback0 = js.Null()
}
_p0 := __callback0
_args[0] = _p0
_end++
if optionalThisForCallbackArgument != nil {
_p1 := optionalThisForCallbackArgument
_args[1] = _p1
_end++
}
_this.Value_JS.Call("forEach", _args[0:_end]...)
return
}
func (_this *EventCounts) Keys() (_result *EventCountsKeyIterator) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("keys", _args[0:_end]...)
var (
_converted *EventCountsKeyIterator // javascript: EventCountsKeyIterator _what_return_name
)
_converted = EventCountsKeyIteratorFromJS(_returned)
_result = _converted
return
}
func (_this *EventCounts) Values() (_result *EventCountsValueIterator) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("values", _args[0:_end]...)
var (
_converted *EventCountsValueIterator // javascript: EventCountsValueIterator _what_return_name
)
_converted = EventCountsValueIteratorFromJS(_returned)
_result = _converted
return
}
func (_this *EventCounts) Get(key string) (_result *uint) {
var (
_args [1]interface{}
_end int
)
_p0 := key
_args[0] = _p0
_end++
_returned := _this.Value_JS.Call("get", _args[0:_end]...)
var (
_converted *uint // javascript: unsigned long _what_return_name
)
if _returned.Type() != js.TypeNull && _returned.Type() != js.TypeUndefined {
__tmp := (uint)((_returned).Int())
_converted = &__tmp
}
_result = _converted
return
}
func (_this *EventCounts) Has(key string) (_result bool) {
var (
_args [1]interface{}
_end int
)
_p0 := key
_args[0] = _p0
_end++
_returned := _this.Value_JS.Call("has", _args[0:_end]...)
var (
_converted bool // javascript: boolean _what_return_name
)
_converted = (_returned).Bool()
_result = _converted
return
}
// class: EventCountsEntryIterator
type EventCountsEntryIterator struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *EventCountsEntryIterator) JSValue() js.Value {
return _this.Value_JS
}
// EventCountsEntryIteratorFromJS is casting a js.Wrapper into EventCountsEntryIterator.
func EventCountsEntryIteratorFromJS(value js.Wrapper) *EventCountsEntryIterator {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &EventCountsEntryIterator{}
ret.Value_JS = input
return ret
}
func (_this *EventCountsEntryIterator) Next() (_result *EventCountsEntryIteratorValue) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("next", _args[0:_end]...)
var (
_converted *EventCountsEntryIteratorValue // javascript: EventCountsEntryIteratorValue _what_return_name
)
_converted = EventCountsEntryIteratorValueFromJS(_returned)
_result = _converted
return
}
// class: EventCountsKeyIterator
type EventCountsKeyIterator struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *EventCountsKeyIterator) JSValue() js.Value {
return _this.Value_JS
}
// EventCountsKeyIteratorFromJS is casting a js.Wrapper into EventCountsKeyIterator.
func EventCountsKeyIteratorFromJS(value js.Wrapper) *EventCountsKeyIterator {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &EventCountsKeyIterator{}
ret.Value_JS = input
return ret
}
func (_this *EventCountsKeyIterator) Next() (_result *EventCountsKeyIteratorValue) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("next", _args[0:_end]...)
var (
_converted *EventCountsKeyIteratorValue // javascript: EventCountsKeyIteratorValue _what_return_name
)
_converted = EventCountsKeyIteratorValueFromJS(_returned)
_result = _converted
return
}
// class: EventCountsValueIterator
type EventCountsValueIterator struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *EventCountsValueIterator) JSValue() js.Value {
return _this.Value_JS
}
// EventCountsValueIteratorFromJS is casting a js.Wrapper into EventCountsValueIterator.
func EventCountsValueIteratorFromJS(value js.Wrapper) *EventCountsValueIterator {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &EventCountsValueIterator{}
ret.Value_JS = input
return ret
}
func (_this *EventCountsValueIterator) Next() (_result *EventCountsValueIteratorValue) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("next", _args[0:_end]...)
var (
_converted *EventCountsValueIteratorValue // javascript: EventCountsValueIteratorValue _what_return_name
)
_converted = EventCountsValueIteratorValueFromJS(_returned)
_result = _converted
return
}
// class: PerformanceEventTiming
type EventTiming struct {
Entry
}
// EventTimingFromJS is casting a js.Wrapper into EventTiming.
func EventTimingFromJS(value js.Wrapper) *EventTiming {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &EventTiming{}
ret.Value_JS = input
return ret
}
// ProcessingStart returning attribute 'processingStart' with
// type float64 (idl: double).
func (_this *EventTiming) ProcessingStart() float64 {
var ret float64
value := _this.Value_JS.Get("processingStart")
ret = (value).Float()
return ret
}
// ProcessingEnd returning attribute 'processingEnd' with
// type float64 (idl: double).
func (_this *EventTiming) ProcessingEnd() float64 {
var ret float64
value := _this.Value_JS.Get("processingEnd")
ret = (value).Float()
return ret
}
// Cancelable returning attribute 'cancelable' with
// type bool (idl: boolean).
func (_this *EventTiming) Cancelable() bool {
var ret bool
value := _this.Value_JS.Get("cancelable")
ret = (value).Bool()
return ret
}
// class: PerformanceLongTaskTiming
type LongTaskTiming struct {
Entry
}
// LongTaskTimingFromJS is casting a js.Wrapper into LongTaskTiming.
func LongTaskTimingFromJS(value js.Wrapper) *LongTaskTiming {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &LongTaskTiming{}
ret.Value_JS = input
return ret
}
// Attribution returning attribute 'attribution' with
// type javascript.FrozenArray (idl: FrozenArray).
func (_this *LongTaskTiming) Attribution() *javascript.FrozenArray {
var ret *javascript.FrozenArray
value := _this.Value_JS.Get("attribution")
ret = javascript.FrozenArrayFromJS(value)
return ret
}
// class: PerformanceMark
type Mark struct {
Entry
}
// MarkFromJS is casting a js.Wrapper into Mark.
func MarkFromJS(value js.Wrapper) *Mark {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &Mark{}
ret.Value_JS = input
return ret
}
func NewPerformanceMark(markName string, markOptions *MarkOptions) (_result *Mark) {
_klass := js.Global().Get("PerformanceMark")
var (
_args [2]interface{}
_end int
)
_p0 := markName
_args[0] = _p0
_end++
if markOptions != nil {
_p1 := markOptions.JSValue()
_args[1] = _p1
_end++
}
_returned := _klass.New(_args[0:_end]...)
var (
_converted *Mark // javascript: PerformanceMark _what_return_name
)
_converted = MarkFromJS(_returned)
_result = _converted
return
}
// Detail returning attribute 'detail' with
// type Any (idl: any).
func (_this *Mark) Detail() js.Value {
var ret js.Value
value := _this.Value_JS.Get("detail")
ret = value
return ret
}
// class: PerformanceMeasure
type Measure struct {
Entry
}
// MeasureFromJS is casting a js.Wrapper into Measure.
func MeasureFromJS(value js.Wrapper) *Measure {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &Measure{}
ret.Value_JS = input
return ret
}
// Detail returning attribute 'detail' with
// type Any (idl: any).
func (_this *Measure) Detail() js.Value {
var ret js.Value
value := _this.Value_JS.Get("detail")
ret = value
return ret
}
// class: PerformanceNavigation
type Navigation struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *Navigation) JSValue() js.Value {
return _this.Value_JS
}
// NavigationFromJS is casting a js.Wrapper into Navigation.
func NavigationFromJS(value js.Wrapper) *Navigation {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &Navigation{}
ret.Value_JS = input
return ret
}
const (
TYPENAVIGATE_PerformanceNavigation int = 0
TYPERELOAD_PerformanceNavigation int = 1
TYPEBACKFORWARD_PerformanceNavigation int = 2
TYPERESERVED_PerformanceNavigation int = 255
)
// Type returning attribute 'type' with
// type int (idl: unsigned short).
func (_this *Navigation) Type() int {
var ret int
value := _this.Value_JS.Get("type")
ret = (value).Int()
return ret
}
// RedirectCount returning attribute 'redirectCount' with
// type int (idl: unsigned short).
func (_this *Navigation) RedirectCount() int {
var ret int
value := _this.Value_JS.Get("redirectCount")
ret = (value).Int()
return ret
}
func (_this *Navigation) ToJSON() (_result *javascript.Object) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("toJSON", _args[0:_end]...)
var (
_converted *javascript.Object // javascript: object _what_return_name
)
_converted = javascript.ObjectFromJS(_returned)
_result = _converted
return
}
// class: PerformanceNavigationTiming
type NavigationTiming struct {
ResourceTiming
}
// NavigationTimingFromJS is casting a js.Wrapper into NavigationTiming.
func NavigationTimingFromJS(value js.Wrapper) *NavigationTiming {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &NavigationTiming{}
ret.Value_JS = input
return ret
}
// UnloadEventStart returning attribute 'unloadEventStart' with
// type float64 (idl: double).
func (_this *NavigationTiming) UnloadEventStart() float64 {
var ret float64
value := _this.Value_JS.Get("unloadEventStart")
ret = (value).Float()
return ret
}
// UnloadEventEnd returning attribute 'unloadEventEnd' with
// type float64 (idl: double).
func (_this *NavigationTiming) UnloadEventEnd() float64 {
var ret float64
value := _this.Value_JS.Get("unloadEventEnd")
ret = (value).Float()
return ret
}
// DomInteractive returning attribute 'domInteractive' with
// type float64 (idl: double).
func (_this *NavigationTiming) DomInteractive() float64 {
var ret float64
value := _this.Value_JS.Get("domInteractive")
ret = (value).Float()
return ret
}
// DomContentLoadedEventStart returning attribute 'domContentLoadedEventStart' with
// type float64 (idl: double).
func (_this *NavigationTiming) DomContentLoadedEventStart() float64 {
var ret float64
value := _this.Value_JS.Get("domContentLoadedEventStart")
ret = (value).Float()
return ret
}
// DomContentLoadedEventEnd returning attribute 'domContentLoadedEventEnd' with
// type float64 (idl: double).
func (_this *NavigationTiming) DomContentLoadedEventEnd() float64 {
var ret float64
value := _this.Value_JS.Get("domContentLoadedEventEnd")
ret = (value).Float()
return ret
}
// DomComplete returning attribute 'domComplete' with
// type float64 (idl: double).
func (_this *NavigationTiming) DomComplete() float64 {
var ret float64
value := _this.Value_JS.Get("domComplete")
ret = (value).Float()
return ret
}
// LoadEventStart returning attribute 'loadEventStart' with
// type float64 (idl: double).
func (_this *NavigationTiming) LoadEventStart() float64 {
var ret float64
value := _this.Value_JS.Get("loadEventStart")
ret = (value).Float()
return ret
}
// LoadEventEnd returning attribute 'loadEventEnd' with
// type float64 (idl: double).
func (_this *NavigationTiming) LoadEventEnd() float64 {
var ret float64
value := _this.Value_JS.Get("loadEventEnd")
ret = (value).Float()
return ret
}
// Type returning attribute 'type' with
// type NavigationType (idl: NavigationType).
func (_this *NavigationTiming) Type() NavigationType {
var ret NavigationType
value := _this.Value_JS.Get("type")
ret = NavigationTypeFromJS(value)
return ret
}
// RedirectCount returning attribute 'redirectCount' with
// type int (idl: unsigned short).
func (_this *NavigationTiming) RedirectCount() int {
var ret int
value := _this.Value_JS.Get("redirectCount")
ret = (value).Int()
return ret
}
func (_this *NavigationTiming) ToJSON3() (_result *javascript.Object) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("toJSON", _args[0:_end]...)
var (
_converted *javascript.Object // javascript: object _what_return_name
)
_converted = javascript.ObjectFromJS(_returned)
_result = _converted
return
}
// class: PerformanceObserver
type Observer struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *Observer) JSValue() js.Value {
return _this.Value_JS
}
// ObserverFromJS is casting a js.Wrapper into Observer.
func ObserverFromJS(value js.Wrapper) *Observer {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &Observer{}
ret.Value_JS = input
return ret
}
// SupportedEntryTypes returning attribute 'supportedEntryTypes' with
// type javascript.FrozenArray (idl: FrozenArray).
func SupportedEntryTypes() *javascript.FrozenArray {
var ret *javascript.FrozenArray
_klass := js.Global().Get("PerformanceObserver")
value := _klass.Get("supportedEntryTypes")
ret = javascript.FrozenArrayFromJS(value)
return ret
}
func NewPerformanceObserver(callback *ObserverCallback) (_result *Observer) {
_klass := js.Global().Get("PerformanceObserver")
var (
_args [1]interface{}
_end int
)
var __callback0 js.Value
if callback != nil {
__callback0 = (*callback).Value
} else {
__callback0 = js.Null()
}
_p0 := __callback0
_args[0] = _p0
_end++
_returned := _klass.New(_args[0:_end]...)
var (
_converted *Observer // javascript: PerformanceObserver _what_return_name
)
_converted = ObserverFromJS(_returned)
_result = _converted
return
}
func (_this *Observer) Observe(options *ObserverInit) {
var (
_args [1]interface{}
_end int
)
_p0 := options.JSValue()
_args[0] = _p0
_end++
_this.Value_JS.Call("observe", _args[0:_end]...)
return
}
func (_this *Observer) Disconnect() {
var (
_args [0]interface{}
_end int
)
_this.Value_JS.Call("disconnect", _args[0:_end]...)
return
}
func (_this *Observer) TakeRecords() (_result []*Entry) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("takeRecords", _args[0:_end]...)
var (
_converted []*Entry // javascript: sequence<PerformanceEntry> _what_return_name
)
__length0 := _returned.Length()
__array0 := make([]*Entry, __length0, __length0)
for __idx0 := 0; __idx0 < __length0; __idx0++ {
var __seq_out0 *Entry
__seq_in0 := _returned.Index(__idx0)
__seq_out0 = EntryFromJS(__seq_in0)
__array0[__idx0] = __seq_out0
}
_converted = __array0
_result = _converted
return
}
// class: PerformanceObserverEntryList
type ObserverEntryList struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *ObserverEntryList) JSValue() js.Value {
return _this.Value_JS
}
// ObserverEntryListFromJS is casting a js.Wrapper into ObserverEntryList.
func ObserverEntryListFromJS(value js.Wrapper) *ObserverEntryList {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &ObserverEntryList{}
ret.Value_JS = input
return ret
}
func (_this *ObserverEntryList) GetEntries() (_result []*Entry) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("getEntries", _args[0:_end]...)
var (
_converted []*Entry // javascript: sequence<PerformanceEntry> _what_return_name
)
__length0 := _returned.Length()
__array0 := make([]*Entry, __length0, __length0)
for __idx0 := 0; __idx0 < __length0; __idx0++ {
var __seq_out0 *Entry
__seq_in0 := _returned.Index(__idx0)
__seq_out0 = EntryFromJS(__seq_in0)
__array0[__idx0] = __seq_out0
}
_converted = __array0
_result = _converted
return
}
func (_this *ObserverEntryList) GetEntriesByType(_type string) (_result []*Entry) {
var (
_args [1]interface{}
_end int
)
_p0 := _type
_args[0] = _p0
_end++
_returned := _this.Value_JS.Call("getEntriesByType", _args[0:_end]...)
var (
_converted []*Entry // javascript: sequence<PerformanceEntry> _what_return_name
)
__length0 := _returned.Length()
__array0 := make([]*Entry, __length0, __length0)
for __idx0 := 0; __idx0 < __length0; __idx0++ {
var __seq_out0 *Entry
__seq_in0 := _returned.Index(__idx0)
__seq_out0 = EntryFromJS(__seq_in0)
__array0[__idx0] = __seq_out0
}
_converted = __array0
_result = _converted
return
}
func (_this *ObserverEntryList) GetEntriesByName(name string, _type *string) (_result []*Entry) {
var (
_args [2]interface{}
_end int
)
_p0 := name
_args[0] = _p0
_end++
if _type != nil {
_p1 := _type
_args[1] = _p1
_end++
}
_returned := _this.Value_JS.Call("getEntriesByName", _args[0:_end]...)
var (
_converted []*Entry // javascript: sequence<PerformanceEntry> _what_return_name
)
__length0 := _returned.Length()
__array0 := make([]*Entry, __length0, __length0)
for __idx0 := 0; __idx0 < __length0; __idx0++ {
var __seq_out0 *Entry
__seq_in0 := _returned.Index(__idx0)
__seq_out0 = EntryFromJS(__seq_in0)
__array0[__idx0] = __seq_out0
}
_converted = __array0
_result = _converted
return
}
// class: Performance
type Performance struct {
domcore.EventTarget
}
// PerformanceFromJS is casting a js.Wrapper into Performance.
func PerformanceFromJS(value js.Wrapper) *Performance {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &Performance{}
ret.Value_JS = input
return ret
}
// TimeOrigin returning attribute 'timeOrigin' with
// type float64 (idl: double).
func (_this *Performance) TimeOrigin() float64 {
var ret float64
value := _this.Value_JS.Get("timeOrigin")
ret = (value).Float()
return ret
}
// EventCounts returning attribute 'eventCounts' with
// type EventCounts (idl: EventCounts).
func (_this *Performance) EventCounts() *EventCounts {
var ret *EventCounts
value := _this.Value_JS.Get("eventCounts")
ret = EventCountsFromJS(value)
return ret
}
// Timing returning attribute 'timing' with
// type Timing (idl: PerformanceTiming).
func (_this *Performance) Timing() *Timing {
var ret *Timing
value := _this.Value_JS.Get("timing")
ret = TimingFromJS(value)
return ret
}
// Navigation returning attribute 'navigation' with
// type Navigation (idl: PerformanceNavigation).
func (_this *Performance) Navigation() *Navigation {
var ret *Navigation
value := _this.Value_JS.Get("navigation")
ret = NavigationFromJS(value)
return ret
}
// OnResourceTimingBufferFull returning attribute 'onresourcetimingbufferfull' with
// type domcore.EventHandler (idl: EventHandlerNonNull).
func (_this *Performance) OnResourceTimingBufferFull() domcore.EventHandlerFunc {
var ret domcore.EventHandlerFunc
value := _this.Value_JS.Get("onresourcetimingbufferfull")
if value.Type() != js.TypeNull && value.Type() != js.TypeUndefined {
ret = domcore.EventHandlerFromJS(value)
}
return ret
}
// event attribute: domcore.Event
func eventFuncPerformance_domcore_Event(listener func(event *domcore.Event, target *Performance)) js.Func {
fn := func(this js.Value, args []js.Value) interface{} {
var ret *domcore.Event
value := args[0]
incoming := value.Get("target")
ret = domcore.EventFromJS(value)
src := PerformanceFromJS(incoming)
listener(ret, src)
return js.Undefined
}
return js.FuncOf(fn)
}
// AddResourceTimingBufferFull is adding doing AddEventListener for 'ResourceTimingBufferFull' on target.
// This method is returning allocated javascript function that need to be released.
func (_this *Performance) AddEventResourceTimingBufferFull(listener func(event *domcore.Event, currentTarget *Performance)) js.Func {
cb := eventFuncPerformance_domcore_Event(listener)
_this.Value_JS.Call("addEventListener", "resourcetimingbufferfull", cb)
return cb
}
// SetOnResourceTimingBufferFull is assigning a function to 'onresourcetimingbufferfull'. This
// This method is returning allocated javascript function that need to be released.
func (_this *Performance) SetOnResourceTimingBufferFull(listener func(event *domcore.Event, currentTarget *Performance)) js.Func {
cb := eventFuncPerformance_domcore_Event(listener)
_this.Value_JS.Set("onresourcetimingbufferfull", cb)
return cb
}
func (_this *Performance) Now() (_result float64) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("now", _args[0:_end]...)
var (
_converted float64 // javascript: double _what_return_name
)
_converted = (_returned).Float()
_result = _converted
return
}
func (_this *Performance) ToJSON() (_result *javascript.Object) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("toJSON", _args[0:_end]...)
var (
_converted *javascript.Object // javascript: object _what_return_name
)
_converted = javascript.ObjectFromJS(_returned)
_result = _converted
return
}
func (_this *Performance) GetEntries() (_result []*Entry) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("getEntries", _args[0:_end]...)
var (
_converted []*Entry // javascript: sequence<PerformanceEntry> _what_return_name
)
__length0 := _returned.Length()
__array0 := make([]*Entry, __length0, __length0)
for __idx0 := 0; __idx0 < __length0; __idx0++ {
var __seq_out0 *Entry
__seq_in0 := _returned.Index(__idx0)
__seq_out0 = EntryFromJS(__seq_in0)
__array0[__idx0] = __seq_out0
}
_converted = __array0
_result = _converted
return
}
func (_this *Performance) GetEntriesByType(_type string) (_result []*Entry) {
var (
_args [1]interface{}
_end int
)
_p0 := _type
_args[0] = _p0
_end++
_returned := _this.Value_JS.Call("getEntriesByType", _args[0:_end]...)
var (
_converted []*Entry // javascript: sequence<PerformanceEntry> _what_return_name
)
__length0 := _returned.Length()
__array0 := make([]*Entry, __length0, __length0)
for __idx0 := 0; __idx0 < __length0; __idx0++ {
var __seq_out0 *Entry
__seq_in0 := _returned.Index(__idx0)
__seq_out0 = EntryFromJS(__seq_in0)
__array0[__idx0] = __seq_out0
}
_converted = __array0
_result = _converted
return
}
func (_this *Performance) GetEntriesByName(name string, _type *string) (_result []*Entry) {
var (
_args [2]interface{}
_end int
)
_p0 := name
_args[0] = _p0
_end++
if _type != nil {
_p1 := _type
_args[1] = _p1
_end++
}
_returned := _this.Value_JS.Call("getEntriesByName", _args[0:_end]...)
var (
_converted []*Entry // javascript: sequence<PerformanceEntry> _what_return_name
)
__length0 := _returned.Length()
__array0 := make([]*Entry, __length0, __length0)
for __idx0 := 0; __idx0 < __length0; __idx0++ {
var __seq_out0 *Entry
__seq_in0 := _returned.Index(__idx0)
__seq_out0 = EntryFromJS(__seq_in0)
__array0[__idx0] = __seq_out0
}
_converted = __array0
_result = _converted
return
}
func (_this *Performance) ClearResourceTimings() {
var (
_args [0]interface{}
_end int
)
_this.Value_JS.Call("clearResourceTimings", _args[0:_end]...)
return
}
func (_this *Performance) SetResourceTimingBufferSize(maxSize uint) {
var (
_args [1]interface{}
_end int
)
_p0 := maxSize
_args[0] = _p0
_end++
_this.Value_JS.Call("setResourceTimingBufferSize", _args[0:_end]...)
return
}
func (_this *Performance) Mark(markName string, markOptions *MarkOptions) (_result *Mark) {
var (
_args [2]interface{}
_end int
)
_p0 := markName
_args[0] = _p0
_end++
if markOptions != nil {
_p1 := markOptions.JSValue()
_args[1] = _p1
_end++
}
_returned := _this.Value_JS.Call("mark", _args[0:_end]...)
var (
_converted *Mark // javascript: PerformanceMark _what_return_name
)
_converted = MarkFromJS(_returned)
_result = _converted
return
}
func (_this *Performance) ClearMarks(markName *string) {
var (
_args [1]interface{}
_end int
)
if markName != nil {
_p0 := markName
_args[0] = _p0
_end++
}
_this.Value_JS.Call("clearMarks", _args[0:_end]...)
return
}
func (_this *Performance) Measure(measureName string, startOrMeasureOptions *Union, endMark *string) (_result *Measure) {
var (
_args [3]interface{}
_end int
)
_p0 := measureName
_args[0] = _p0
_end++
if startOrMeasureOptions != nil {
_p1 := startOrMeasureOptions.JSValue()
_args[1] = _p1
_end++
}
if endMark != nil {
_p2 := endMark
_args[2] = _p2
_end++
}
_returned := _this.Value_JS.Call("measure", _args[0:_end]...)
var (
_converted *Measure // javascript: PerformanceMeasure _what_return_name
)
_converted = MeasureFromJS(_returned)
_result = _converted
return
}
func (_this *Performance) ClearMeasures(measureName *string) {
var (
_args [1]interface{}
_end int
)
if measureName != nil {
_p0 := measureName
_args[0] = _p0
_end++
}
_this.Value_JS.Call("clearMeasures", _args[0:_end]...)
return
}
// class: PerformancePaintTiming
type PerformancePaintTiming struct {
Entry
}
// PerformancePaintTimingFromJS is casting a js.Wrapper into PerformancePaintTiming.
func PerformancePaintTimingFromJS(value js.Wrapper) *PerformancePaintTiming {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &PerformancePaintTiming{}
ret.Value_JS = input
return ret
}
// class: PerformanceResourceTiming
type ResourceTiming struct {
Entry
}
// ResourceTimingFromJS is casting a js.Wrapper into ResourceTiming.
func ResourceTimingFromJS(value js.Wrapper) *ResourceTiming {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &ResourceTiming{}
ret.Value_JS = input
return ret
}
// InitiatorType returning attribute 'initiatorType' with
// type string (idl: DOMString).
func (_this *ResourceTiming) InitiatorType() string {
var ret string
value := _this.Value_JS.Get("initiatorType")
ret = (value).String()
return ret
}
// NextHopProtocol returning attribute 'nextHopProtocol' with
// type string (idl: DOMString).
func (_this *ResourceTiming) NextHopProtocol() string {
var ret string
value := _this.Value_JS.Get("nextHopProtocol")
ret = (value).String()
return ret
}
// WorkerStart returning attribute 'workerStart' with
// type float64 (idl: double).
func (_this *ResourceTiming) WorkerStart() float64 {
var ret float64
value := _this.Value_JS.Get("workerStart")
ret = (value).Float()
return ret
}
// RedirectStart returning attribute 'redirectStart' with
// type float64 (idl: double).
func (_this *ResourceTiming) RedirectStart() float64 {
var ret float64
value := _this.Value_JS.Get("redirectStart")
ret = (value).Float()
return ret
}
// RedirectEnd returning attribute 'redirectEnd' with
// type float64 (idl: double).
func (_this *ResourceTiming) RedirectEnd() float64 {
var ret float64
value := _this.Value_JS.Get("redirectEnd")
ret = (value).Float()
return ret
}
// FetchStart returning attribute 'fetchStart' with
// type float64 (idl: double).
func (_this *ResourceTiming) FetchStart() float64 {
var ret float64
value := _this.Value_JS.Get("fetchStart")
ret = (value).Float()
return ret
}
// DomainLookupStart returning attribute 'domainLookupStart' with
// type float64 (idl: double).
func (_this *ResourceTiming) DomainLookupStart() float64 {
var ret float64
value := _this.Value_JS.Get("domainLookupStart")
ret = (value).Float()
return ret
}
// DomainLookupEnd returning attribute 'domainLookupEnd' with
// type float64 (idl: double).
func (_this *ResourceTiming) DomainLookupEnd() float64 {
var ret float64
value := _this.Value_JS.Get("domainLookupEnd")
ret = (value).Float()
return ret
}
// ConnectStart returning attribute 'connectStart' with
// type float64 (idl: double).
func (_this *ResourceTiming) ConnectStart() float64 {
var ret float64
value := _this.Value_JS.Get("connectStart")
ret = (value).Float()
return ret
}
// ConnectEnd returning attribute 'connectEnd' with
// type float64 (idl: double).
func (_this *ResourceTiming) ConnectEnd() float64 {
var ret float64
value := _this.Value_JS.Get("connectEnd")
ret = (value).Float()
return ret
}
// SecureConnectionStart returning attribute 'secureConnectionStart' with
// type float64 (idl: double).
func (_this *ResourceTiming) SecureConnectionStart() float64 {
var ret float64
value := _this.Value_JS.Get("secureConnectionStart")
ret = (value).Float()
return ret
}
// RequestStart returning attribute 'requestStart' with
// type float64 (idl: double).
func (_this *ResourceTiming) RequestStart() float64 {
var ret float64
value := _this.Value_JS.Get("requestStart")
ret = (value).Float()
return ret
}
// ResponseStart returning attribute 'responseStart' with
// type float64 (idl: double).
func (_this *ResourceTiming) ResponseStart() float64 {
var ret float64
value := _this.Value_JS.Get("responseStart")
ret = (value).Float()
return ret
}
// ResponseEnd returning attribute 'responseEnd' with
// type float64 (idl: double).
func (_this *ResourceTiming) ResponseEnd() float64 {
var ret float64
value := _this.Value_JS.Get("responseEnd")
ret = (value).Float()
return ret
}
// TransferSize returning attribute 'transferSize' with
// type int (idl: unsigned long long).
func (_this *ResourceTiming) TransferSize() int {
var ret int
value := _this.Value_JS.Get("transferSize")
ret = (value).Int()
return ret
}
// EncodedBodySize returning attribute 'encodedBodySize' with
// type int (idl: unsigned long long).
func (_this *ResourceTiming) EncodedBodySize() int {
var ret int
value := _this.Value_JS.Get("encodedBodySize")
ret = (value).Int()
return ret
}
// DecodedBodySize returning attribute 'decodedBodySize' with
// type int (idl: unsigned long long).
func (_this *ResourceTiming) DecodedBodySize() int {
var ret int
value := _this.Value_JS.Get("decodedBodySize")
ret = (value).Int()
return ret
}
// ServerTiming returning attribute 'serverTiming' with
// type javascript.FrozenArray (idl: FrozenArray).
func (_this *ResourceTiming) ServerTiming() *javascript.FrozenArray {
var ret *javascript.FrozenArray
value := _this.Value_JS.Get("serverTiming")
ret = javascript.FrozenArrayFromJS(value)
return ret
}
func (_this *ResourceTiming) ToJSON2() (_result *javascript.Object) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("toJSON", _args[0:_end]...)
var (
_converted *javascript.Object // javascript: object _what_return_name
)
_converted = javascript.ObjectFromJS(_returned)
_result = _converted
return
}
// class: PerformanceServerTiming
type ServerTiming struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *ServerTiming) JSValue() js.Value {
return _this.Value_JS
}
// ServerTimingFromJS is casting a js.Wrapper into ServerTiming.
func ServerTimingFromJS(value js.Wrapper) *ServerTiming {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &ServerTiming{}
ret.Value_JS = input
return ret
}
// Name returning attribute 'name' with
// type string (idl: DOMString).
func (_this *ServerTiming) Name() string {
var ret string
value := _this.Value_JS.Get("name")
ret = (value).String()
return ret
}
// Duration returning attribute 'duration' with
// type float64 (idl: double).
func (_this *ServerTiming) Duration() float64 {
var ret float64
value := _this.Value_JS.Get("duration")
ret = (value).Float()
return ret
}
// Description returning attribute 'description' with
// type string (idl: DOMString).
func (_this *ServerTiming) Description() string {
var ret string
value := _this.Value_JS.Get("description")
ret = (value).String()
return ret
}
func (_this *ServerTiming) ToJSON() (_result *javascript.Object) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("toJSON", _args[0:_end]...)
var (
_converted *javascript.Object // javascript: object _what_return_name
)
_converted = javascript.ObjectFromJS(_returned)
_result = _converted
return
}
// class: TaskAttributionTiming
type TaskAttributionTiming struct {
Entry
}
// TaskAttributionTimingFromJS is casting a js.Wrapper into TaskAttributionTiming.
func TaskAttributionTimingFromJS(value js.Wrapper) *TaskAttributionTiming {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &TaskAttributionTiming{}
ret.Value_JS = input
return ret
}
// ContainerType returning attribute 'containerType' with
// type string (idl: DOMString).
func (_this *TaskAttributionTiming) ContainerType() string {
var ret string
value := _this.Value_JS.Get("containerType")
ret = (value).String()
return ret
}
// ContainerSrc returning attribute 'containerSrc' with
// type string (idl: DOMString).
func (_this *TaskAttributionTiming) ContainerSrc() string {
var ret string
value := _this.Value_JS.Get("containerSrc")
ret = (value).String()
return ret
}
// ContainerId returning attribute 'containerId' with
// type string (idl: DOMString).
func (_this *TaskAttributionTiming) ContainerId() string {
var ret string
value := _this.Value_JS.Get("containerId")
ret = (value).String()
return ret
}
// ContainerName returning attribute 'containerName' with
// type string (idl: DOMString).
func (_this *TaskAttributionTiming) ContainerName() string {
var ret string
value := _this.Value_JS.Get("containerName")
ret = (value).String()
return ret
}
// class: PerformanceTiming
type Timing struct {
// Value_JS holds a reference to a javascript value
Value_JS js.Value
}
func (_this *Timing) JSValue() js.Value {
return _this.Value_JS
}
// TimingFromJS is casting a js.Wrapper into Timing.
func TimingFromJS(value js.Wrapper) *Timing {
input := value.JSValue()
if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
return nil
}
ret := &Timing{}
ret.Value_JS = input
return ret
}
// NavigationStart returning attribute 'navigationStart' with
// type int (idl: unsigned long long).
func (_this *Timing) NavigationStart() int {
var ret int
value := _this.Value_JS.Get("navigationStart")
ret = (value).Int()
return ret
}
// UnloadEventStart returning attribute 'unloadEventStart' with
// type int (idl: unsigned long long).
func (_this *Timing) UnloadEventStart() int {
var ret int
value := _this.Value_JS.Get("unloadEventStart")
ret = (value).Int()
return ret
}
// UnloadEventEnd returning attribute 'unloadEventEnd' with
// type int (idl: unsigned long long).
func (_this *Timing) UnloadEventEnd() int {
var ret int
value := _this.Value_JS.Get("unloadEventEnd")
ret = (value).Int()
return ret
}
// RedirectStart returning attribute 'redirectStart' with
// type int (idl: unsigned long long).
func (_this *Timing) RedirectStart() int {
var ret int
value := _this.Value_JS.Get("redirectStart")
ret = (value).Int()
return ret
}
// RedirectEnd returning attribute 'redirectEnd' with
// type int (idl: unsigned long long).
func (_this *Timing) RedirectEnd() int {
var ret int
value := _this.Value_JS.Get("redirectEnd")
ret = (value).Int()
return ret
}
// FetchStart returning attribute 'fetchStart' with
// type int (idl: unsigned long long).
func (_this *Timing) FetchStart() int {
var ret int
value := _this.Value_JS.Get("fetchStart")
ret = (value).Int()
return ret
}
// DomainLookupStart returning attribute 'domainLookupStart' with
// type int (idl: unsigned long long).
func (_this *Timing) DomainLookupStart() int {
var ret int
value := _this.Value_JS.Get("domainLookupStart")
ret = (value).Int()
return ret
}
// DomainLookupEnd returning attribute 'domainLookupEnd' with
// type int (idl: unsigned long long).
func (_this *Timing) DomainLookupEnd() int {
var ret int
value := _this.Value_JS.Get("domainLookupEnd")
ret = (value).Int()
return ret
}
// ConnectStart returning attribute 'connectStart' with
// type int (idl: unsigned long long).
func (_this *Timing) ConnectStart() int {
var ret int
value := _this.Value_JS.Get("connectStart")
ret = (value).Int()
return ret
}
// ConnectEnd returning attribute 'connectEnd' with
// type int (idl: unsigned long long).
func (_this *Timing) ConnectEnd() int {
var ret int
value := _this.Value_JS.Get("connectEnd")
ret = (value).Int()
return ret
}
// SecureConnectionStart returning attribute 'secureConnectionStart' with
// type int (idl: unsigned long long).
func (_this *Timing) SecureConnectionStart() int {
var ret int
value := _this.Value_JS.Get("secureConnectionStart")
ret = (value).Int()
return ret
}
// RequestStart returning attribute 'requestStart' with
// type int (idl: unsigned long long).
func (_this *Timing) RequestStart() int {
var ret int
value := _this.Value_JS.Get("requestStart")
ret = (value).Int()
return ret
}
// ResponseStart returning attribute 'responseStart' with
// type int (idl: unsigned long long).
func (_this *Timing) ResponseStart() int {
var ret int
value := _this.Value_JS.Get("responseStart")
ret = (value).Int()
return ret
}
// ResponseEnd returning attribute 'responseEnd' with
// type int (idl: unsigned long long).
func (_this *Timing) ResponseEnd() int {
var ret int
value := _this.Value_JS.Get("responseEnd")
ret = (value).Int()
return ret
}
// DomLoading returning attribute 'domLoading' with
// type int (idl: unsigned long long).
func (_this *Timing) DomLoading() int {
var ret int
value := _this.Value_JS.Get("domLoading")
ret = (value).Int()
return ret
}
// DomInteractive returning attribute 'domInteractive' with
// type int (idl: unsigned long long).
func (_this *Timing) DomInteractive() int {
var ret int
value := _this.Value_JS.Get("domInteractive")
ret = (value).Int()
return ret
}
// DomContentLoadedEventStart returning attribute 'domContentLoadedEventStart' with
// type int (idl: unsigned long long).
func (_this *Timing) DomContentLoadedEventStart() int {
var ret int
value := _this.Value_JS.Get("domContentLoadedEventStart")
ret = (value).Int()
return ret
}
// DomContentLoadedEventEnd returning attribute 'domContentLoadedEventEnd' with
// type int (idl: unsigned long long).
func (_this *Timing) DomContentLoadedEventEnd() int {
var ret int
value := _this.Value_JS.Get("domContentLoadedEventEnd")
ret = (value).Int()
return ret
}
// DomComplete returning attribute 'domComplete' with
// type int (idl: unsigned long long).
func (_this *Timing) DomComplete() int {
var ret int
value := _this.Value_JS.Get("domComplete")
ret = (value).Int()
return ret
}
// LoadEventStart returning attribute 'loadEventStart' with
// type int (idl: unsigned long long).
func (_this *Timing) LoadEventStart() int {
var ret int
value := _this.Value_JS.Get("loadEventStart")
ret = (value).Int()
return ret
}
// LoadEventEnd returning attribute 'loadEventEnd' with
// type int (idl: unsigned long long).
func (_this *Timing) LoadEventEnd() int {
var ret int
value := _this.Value_JS.Get("loadEventEnd")
ret = (value).Int()
return ret
}
func (_this *Timing) ToJSON() (_result *javascript.Object) {
var (
_args [0]interface{}
_end int
)
_returned := _this.Value_JS.Call("toJSON", _args[0:_end]...)
var (
_converted *javascript.Object // javascript: object _what_return_name
)
_converted = javascript.ObjectFromJS(_returned)
_result = _converted
return
}
You can’t perform that action at this time.