Static
cellps0A shortcut of ' cellpadding="0" cellspacing="0" border="0"'
.
Static
i0A shortcut of '<i style="height:0;width:0"/>'
.
Static
img0A shortcut of '<img style="height:0;width:0"/>'
.
Static
appendAppends an attribute.
Notice that the attribute won't be appended if val is empty or false.
In other words, it is equivalent to
val ? ' ' + nm + '="' + val + '"': ""
.
If you want to generate the attribute no matter what val is, use (appendAttr:ARGS_3).
the name of the attribute
the value of the attribute
5.0.3
Appends an attribute. Notice that the attribute won't be appended.
the name of the attribute
the value of the attribute
whether to append attribute no matter what value it is. If false (or omitted), it is the same as (appendAttr:ARGS_2).
5.0.3
Static
convertStatic
debounceCreates and returns a new debounced version of the passed function which will postpone its execution until after wait milliseconds have elapsed since the last time it was invoked. Useful for implementing behavior that should only happen after the input has stopped arriving.
Copied from debounce, MIT license.
a new debounced version of the passed function
9.6.0
Static
decodeXMLStatic
destroyRemoves the message box created by progressbox.
the ID of the DOM element of the message box
Optional
opts: Partial<ProgressboxOptions>Static
encodeURLStatic
encodeXMLEncodes the string to a valid XML string. Refer to Utl for more XML utilities.
the text to encode
Optional
opts: EncodeXmlOptionsthe options. Allowd value:
the encoded text.
Static
encodeXMLAttributeStatic
fireFires beforeSize, onShow, onFitSize, onSize and afterSize
the widget which the zWatch event will be fired against.
Optional
bfsz: numberthe beforeSize mode:
5.0.8
Static
fireFires beforeSize, onFitSize, onSize and afterSize
the widget which the zWatch event will be fired against.
Optional
bfsz: numberthe beforeSize mode:
5.0.8
Static
framesStatic
getthe ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device. For more information, please visit https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio
8.6.0
Static
geta constraints object specifying the types of media to request
the Promise whose fulfillment handler receives a MediaStream object when the requested media has successfully been obtained. Note: this function may returns a Promise that is rejected, if this browser not support getUserMedia. For more information, please visit https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
8.6.1
Static
getStatic
goNavigates to the specified URL.
the URL to go to
Optional
opts: Partial<GoOptions>the options. Allowed values:
Static
intsStatic
isif one is ancestor of the other.
It assumes the object has either a method called getParent
or a field called parent
.
A typical example is used to test the widgets (Widget).
Notice that, if you want to test DOM elements, please use jq.isAncestor instead.
jq.isAncestor
Static
isthe character
the options.
Name | Allowed Values | Description |
---|---|---|
digit | true, false | Specifies the character is digit only. |
upper | true, false | Specifies the character is upper case only. |
lower | true, false | Specifies the character is lower case only. |
whitespace | true, false | Specifies the character is whitespace only. |
opts[cc] | true, false | Specifies the character is allowed only. |
whether the character is according to its opts.
Static
isStatic
isStatic
loadStatic
mapConverts a map to a string
the map to convert
Optional
assign: stringthe symbol for assignment. If omitted, '=' is assumed.
Optional
separator: stringthe symbol for separator. If omitted, ',' is assumed.
Static
parseParses the specifie text into a map. For example
zUtl.parseMap("a=b,c=d");
zUtl.parseMap("a='b c',c=de", ',', "'\"");
the text to parse
Optional
separator: stringthe separator. If omitted, ','
is assumed
Optional
quote: stringthe quote to handle. Ignored if omitted.
the map
Static
progressboxCreates a message box to indicate something is being processed
the ID of the DOM element being created
the message to shown
Optional
mask: booleanwhether to show sem-transparent mask to prevent the user from accessing it.
Optional
icon: stringthe CSS class used to shown an icon in the box. Ignored if not specified.
Optional
opts: Partial<ProgressboxOptions>Static
stringConverts a string separated by comma to an array of integers.
the string to convert. If null, null is returned.
the default value used if the value is not specified. For example, zUtl.stringToInts("1,,3", 2) returns [1, 2, 3].
Static
throttleCreates and returns a new, throttled version of the passed function, that, when invoked repeatedly, will only actually call the original function at most once per every wait milliseconds. Useful for rate-limiting events that occur faster than you can keep up with.
Copied from underscore.js, MIT license.
a new, throttled version of the passed function
9.6.0
Static
todayif true, returns the full time, else only returns year, month, and day. If omitted, false is assumed
Optional
tz: stringtoday.
the time format, such as HH:mm:ss.SSS If a time element such as seconds not specified in the format, it will be considered as 0. For example, if the format is "HH:mm", then the returned object will be today, this hour and this minute, but the second and milliseconds will be zero.
Optional
tz: stringtoday.
5.0.6
Import
zk.Widget
Import
zk.xml.Utl The basic utilities.
For more utilities, refer to Utl.