Function
Static Public Summary | ||
public |
WrappedListener(orig_listener: function, win: Window): Object Wrap the original eventListener for type "message"
|
|
public |
def_prop(obj: DomElement | MessageEvent | JSNative, prop: string, set_func: function, get_func: function, enumerable: boolean): boolean Override a property on the given object by defining either its setter or getter or both |
|
public |
Determines if the string ends with the given suffix |
|
public |
equals_any(string: string, arr: string[]): string | undefined Determines if the string is equal to any string in an array |
|
public |
get_orig_getter(obj: Object, prop: string): function Retrieve the original getter for an property on an object |
|
public |
get_orig_setter(obj: Object, prop: string): function Retrieve the original setter for an property on an object |
|
public |
is_host_url(str: string): boolean Determines if a given string is a host url |
|
public |
next_parent(win: Window): boolean
|
|
public |
Determines if a given string starts with single prefix or an array of prefixes |
Static Public
public WrappedListener(orig_listener: function, win: Window): Object source
Wrap the original eventListener for type "message"
- if the events
data.to_host
is not "*" and windowsWB_wombat_location
host is not equal to the events data.to_host skip - if the events data is from top sets the source to
__WB_top_frame
- if the events
data.src_id
and__WB_win_id
object exists and the eventsdata.src_id
has a mapping in__WB_win_id
set the source to that mapping
public def_prop(obj: DomElement | MessageEvent | JSNative, prop: string, set_func: function, get_func: function, enumerable: boolean): boolean source
Override a property on the given object by defining either its setter or getter or both
Params:
Name | Type | Attribute | Description |
obj | DomElement | MessageEvent | JSNative | ||
prop | string |
|
the property to override |
set_func | function |
|
the set function override for the property |
get_func | function |
|
the get function override for the property |
enumerable | boolean |
|
true if and only if this property shows up during enumeration of the properties on the corresponding object. |
public ends_with(str: string, suffix: string): string | undefined source
Determines if the string ends with the given suffix
public equals_any(string: string, arr: string[]): string | undefined source
Determines if the string is equal to any string in an array
public get_orig_getter(obj: Object, prop: string): function source
Retrieve the original getter for an property on an object
public get_orig_setter(obj: Object, prop: string): function source
Retrieve the original setter for an property on an object
public is_host_url(str: string): boolean source
Determines if a given string is a host url
Params:
Name | Type | Attribute | Description |
str | string | the string to test |
public next_parent(win: Window): boolean source
- if window is null or undefined return false
- if
win.wbinfo
is falsey returnwin._wb_wombat !== undefined
else return!win.wbinfo.is_frame
- if an Exception occurs returns false
Params:
Name | Type | Attribute | Description |
win | Window |