Script Inclusion
All the examples on the page are live. The code you see on the page is what's running behind the scenes. You can copy and past the code blocks on your own site and they'll run there as well. The only changes you need to make are:
Load the bitty web component once on the page with the script tag:
-
Wrap the JavaScript example blocks in
a
tag.
Release Notes
Check out the release notes for the latest changes.
Overview
This page contains the documentation for bitty's entire public API. It's broken down into four categories:
- The `data-*` attribute that make up the HTML interface
- `this.api...` methods provided by bitty for use inside the JavaScipt class that's providing functionality
- Helper methods and properties that are added to events that come in from bitty signals (i.e. the `ev` argument in `someFeature(ev, el)` methods).
- Helper methods and properties that are added to the elements that are processed when a bitty signal is received (i.e. the `e.` argument in `someFeature(ev, el)` methods).
Terminology
Under construction.Event and Element Varaibles
bitty sends to arguemnts to the methods that process signals. The first is the event that triggered the signal. The second is the element that's currently being processed. The signture looks like this:
This documentaiton uses `ev` to identify the events and `el` to identify the elements.
HTML data-*attribute API
data-connect
Availability
- tags: Yes
- Child elements: No
Details
TOdo: Document that they url based `data-connect` values must either start with `http` or a `/`. If it's `http`, then it's used directly. If it's a `/`, the domain and port from the `window.location.href` is used.
- Defines the class that provides functionality to the component.
-
Each requires an external class to provide its functionality. The class can reside in one of four locations:
If there is no
data-connectattribute on the<bitty-7-0>component tag, then bitty looks for awindow.variable. For example:index.htmlGet the dateExample(notE: If you clicked the button in the example at the top of the page the date will already be showing here. That's because both examples are on the same page. It's possible to separate them, but it adds a little extra code that isn't necessary in general usage. )
-
If the
data-connectattribute exists and its value matches a variable on thewindowobject, then theclassfrom that variable is used. For example:index.htmlGet Random NumberExample The default export from an external module when the value of `data-connect` is the path to the module. For example:
index.htmlGet Random Number/documentation/7/0/0/support/data-connect-default-class.jsExampleA named class from an external module when the value of `data-connect` is a path followed by a space then the name of the class to look for. For example:
index.htmlGet Random Number/documentation/7/0/0//support/data-connect-alt-class.jsAltModuleClassExample
data-init
Availability
- tags: Yes
- Child elements: Yes
Details
-
data-initis designed to do the initial load in of elements on a page. - Signals defined by the
data-initattribute fire once when the component is initializing. - The signals are processed after
bittyInit()is called in the class and beforedata-sendsignals from the tag are sent. - Child elements with `data-init` attributes that are added to a bitty element after it has been initialized _do not_ fire the `data-init` process.
window. = ;
data-listeners
Availability
- tags: Yes
- Child elements: No
Details
The data-listeners attribute changes the events a component listens for. The default events are `click` and `input`. Changing it to listen to `mouseenter` looks like this:
Move Mouse Over
-
window. =
Multiple listeners can be added by separating them with a space:
Move Mouse Over
-
window. =
Using `data-listeners` remove the default `click` and `input` listeners. They can be added back in explicitly if needed.
Move Mouse Over or Click
-
window. =
data-receive
Availability
- tags: No
- Child elements: Yes
Details
Adding a `data-receive` attribute to an element sets it up to receive signals with the given name.
Click For Random Number
-
window. =
Multiple elements can receive the same signal. Each one gets passed through the corresponding function individually (i.e. a different random number is generated for each):
Click For Random Number
-
-
-
window. =
A single element can receive multiple signals by separating the signal names with a space in the `data-receive` attribute:
Send Alfa
Send Bravo
Send Charlie
-
window. =
data-send
Availability
- tags: Yes
- Child elements: Yes
Details
Sending Single Signals
The `data-send` attribute defines which signals an element sends when an event that's being listend for fires.
Click For Random Number
-
window. =
Sending Multiple Signals
A single element can send multiple signals by separating them with a space in the `data-send` attribute:
Send Multiple Signals
-
-
-
window. =
Sending From the <bitty-7-0> tag
A `data-send` attribute can be added to the bitty-7-0 component tag itself. It functions the same was as `data-send` attributes on child elements
Click the green area
window. =
Sending Without Receivers
If an event triggers a `data-send` signal and there are no matching `data-receive` elements, then the corresponding method is fired once with a `null` value for the element. For example:
Increment
-
window. =
This is useful when the number of times an update needs to occur differers from the number of receiving elements. For example, incrementing by one works if a button is connected to only one element with a matching `data-receive` attribute:
Increment
-
window. =
If there are multiple receivers, each one increments the `#count` on its own. For example, every click of this button adds one to each output so they end up with `1, 2, 3`, then `4, 5, 6`, etc...
Increment
-
-
-
window. =
Sending an individual signal to do the incrementing that isn't associated with an `data-receive` elements followed by a signal that _is_ connected to them keeps them in sync
Increment
-
-
-
window. =
async Signal Methods
Signal Methods can be `async`
Send Signal
-
window. =
awaiting async Signals
async signals can be awaited by prefacing them with
await: (i.e. await:someSignal someOtherSignal)
TOdo: add await example
notE: Each bitty element on a page receives signlas independently. There is no built-in await across them if more than one receive the signal
Sending Signals from Ancestors
TOdo: Cover that events only go up to the first element with a `data-send` attribute on them. (i.e. if there are ancestors further up the doM that have `data-send` they are not triggered)
TOdo: Create ancestors example
data-use
Availability
- tags: No
- Child elements: Yes
Details
data-use combines the baisc features
of data-send and data-receive
but only operates on itself. (i.e. if you click
an element with data-use="SomeSignal"
it will use the corresponding method but any
elements with data-receive="SomeSignal"
won't be affected.
TOdo: Exapand the write up and add examples
this.api Methods
forward(event, signal)
TOdo
event
TOdosignal
TOdogetElement(url, subs=[], options={})
TOdo
url
TOdosubs=[]
TOdooptions={}
TOdogetHTML(url, subs=[], options={})
TOdo
url
TOdosubs=[]
TOdooptions={}
TOdogetJSON(url, subs=[], options={})
TOdo
url
TOdosubs=[]
TOdooptions={}
TOdogetSVG(url, subs=[], options={})
TOdo
url
TOdosubs=[]
TOdooptions={}
TOdogetTXT(url, subs=[], options={})
TOdo
url
TOdosubs=[]
TOdooptions={}
TOdoloadCSS(url, subs=[], options={})
TOdo
url
TOdosubs=[]
TOdooptions={}
TOdolocalTrigger(signal)
TOdo
signal
TOdomakeElement(template, subs=[])
TOdo
template
TOdosubs=[]
TOdomakeHTML(template, subs=[])
TOdo
template
TOdosubs=[]
TOdomakeSVG(template, subs=[])
TOdo
template
TOdosubs=[]
TOdomakeTXT(template, subs=[])
TOdo
template
TOdosubs=[]
TOdosetProp(key, value)
TOdo
key
TOdovalue
TOdotrigger(signal)
TOdo
signal
TOdoEvent API Extensions
ev
Methods
ev.prop(KEY) [added: 7.0.0]
-
KEY
The
KEYpart ofdata-KEYto match
- Looks for a
data-KEYattribute from theev.element in itsev..property that matchesKEYand returns the value as a string. - If the
ev.element does not have adata-KEYthe process looks for ancestors with adata-KEYattribute. The first one that's found gets used. - If neither the
ev.element or any of its ancestors have thedata-KEYattribute the returned value isundefined.
If ev has
a
data-KEY="VALUE" attribute, then the
VALUE is returned as a string.
[generated-0010]
Test Target
waiting
window. =
ev does not have
a
data-KEY="VALUE" attribute, but an
ancestor of
ev does have
a
data-KEY="VALUE" attribute, then
VALUE is returned as a string. [generated-0020]
Test Target
waiting
window. =
If neither ev or an
ancestor of
ev have a
data-KEY="VALUE" attribute, then
undefined is returned.
[generated-0030]
Test Target
waiting
window. =
ev.propToFloat(KEY) [added: ]
-
KEY
The
KEYpart ofdata-KEYto match
return the value of a
data-KEY
attribute from the
ev
as a
float [generated-0010]
Test Target
waiting
window. =
return a
float if
ev
does not have
data-KEY
attribute, but an ancestor
DOES have
a
data-KEY
attribute [generated-0020]
Test Target
waiting
window. =
return
floatfrom
evif
ev
has
a
data-KEY
attribute and an ancestor of
ev
has
a
data-KEY
attribute [generated-0030]
Test Target
waiting
window. =
return
undefined
if
ev
does not have
a
data-KEY
attribute and ancestors
do not have
data-KEY
attributes [generated-0040]
Test Target
waiting
window. =
return
NaN
if
ev
has
a
data-KEY
attribute but it
is not
a number [generated-0050]
Test Target
waiting
window. =
return
NaN
if
ev
does not have
a
data-KEY
but an ancestor
does have
a
data-KEY
attribute but it
is not
a number [generated-0060]
Test Target
waiting
window. =
ev.propToInt(KEY) [added: ]
-
KEY
The
KEYpart ofdata-KEYto match
return Int if
ev
has
a
data-KEY
attribute and it's an Int [generated-0010]
Test Target
waiting
window. =
return Int if
ev
does not have
a
data-KEY
attribute, but an ancestor
does have
a
data-KEY
attribute [generated-0020]
Test Target
waiting
window. =
return Int from
evif
ev
has
a
data-KEY
attribute and an ancestor of
ev
has
a
data-KEY
attribute [generated-0030]
Test Target
waiting
window. =
return
undefined
if
ev
does not have
a
data-KEY
attribute
and ancestors
do not have
data-KEY
attributes [generated-0040]
Test Target
waiting
window. =
return
NaN
if
ev
has
a
data-KEY
attribute
but it
is not
a number [generated-0050]
Test Target
waiting
window. =
return
NaN
if
ev
does not have
a
data-KEY
but an ancestor
does have
a
data-KEY
attribute
but it
is not
a number [generated-0060]
Test Target
waiting
window. =
Properties
ev.bittyId [added: 7.0.0]
Alias for ev....
bittyId exists [generated-0010]
Test Button
waiting
window. =
ev.sender [added: 7.0.0]
Reference to the HTML Element that sent the event.
[generated-0010]
waiting
window. =
ev.value [added: 7.0.0]
Alias for ev...
[generated-0010]
waiting window. =
ev.valueToFloat [added: 7.0.0]
Alias for .
[generated-0010]
waiting window. =
ev.valueToInt [added: 7.0.0]
Alias for .
[generated-0010]
waiting window. =
ev.sender
Methods
ev.sender.prop(KEY) [added: 7.0.0]
-
KEY
- Looks for a
data-KEYattribute from theev.element in itsev..property that matchesKEYand returns the value as a string. - If the
ev.element does not have adata-KEYthe process looks for ancestors with adata-KEYattribute. The first one that's found gets used. - If neither the
ev.element or any of its ancestors have thedata-KEYattribute the returned value isundefined.
If ev. has
a
data-KEY="VALUE" attribute, then the
VALUE is returned as a string.
[generated-0010]
Test Target
waiting
window. =
ev.sender.propToFloat(KEY) [added: 7.0.0]
-
KEY
- Looks for a
data-KEYattribute from theev.element in itsev..property that matchesKEYand returns the value as a string. - If the
ev.element does not have adata-KEYthe process looks for ancestors with adata-KEYattribute. The first one that's found gets used. - If neither the
ev.element or any of its ancestors have thedata-KEYattribute the returned value isundefined.
return the value of a
data-KEY
attribute from the
ev
as a
float [generated-0010]
Test Target
waiting
window. =
ev.sender.propToInt(KEY) [added: 7.0.0]
-
KEY
- Looks for a
data-KEYattribute from theev.element in itsev..property that matchesKEYand returns the value as a string. - If the
ev.element does not have adata-KEYthe process looks for ancestors with adata-KEYattribute. The first one that's found gets used. - If neither the
ev.element or any of its ancestors have thedata-KEYattribute the returned value isundefined.
return Int if
ev
has
a
data-KEY
attribute and it's an Int [generated-0010]
Test Target
waiting
window. =
Properties
ev.sender.bittyId [added: 7.0.0]
Alias for ev....
bittyId exists [generated-0010]
Test Button
waiting
window. =
ev.sender.value [added: 7.0.0]
Alias for ev...
[generated-0010]
waiting window. =
ev.sender.valueToFloat [added: 7.0.0]
Alias for .
[generated-0010]
waiting window. =
ev.sender.valueToInt [added: 7.0.0]
Alias for .
[generated-0010]
waiting window. =
Element API Extensions
Methods
el.prop(KEY) [added: 7.0.0]
-
KEYReturns the value from a `data-*` where `*` is the `KEY` (e.g. `data-KEY="value"`)
- Looks for a
data-KEYattribute from theev.element in itsev..property that matchesKEYand returns the value as a string. - If the
ev.element does not have adata-KEYthe process looks for ancestors with adata-KEYattribute. The first one that's found gets used. - If neither the
ev.element or any of its ancestors have thedata-KEYattribute the returned value isundefined.
If el has
a
data-KEY="VALUE" attribute, then the
VALUE is returned as a string. [generated-0010]
waiting
window. =
el does not have
a
data-KEY="VALUE" attribute, but an
ancestor of
el does have
a
data-KEY="VALUE" attribute, then
VALUE is returned as a string.
[generated-0020]
waiting
window. =
If neither el or an
ancestor of
el have a
data-KEY="VALUE" attribute, then
undefined is returned.
[generated-0030]
waiting
window. =
el.propMatchesSender(KEY) [added: 7.0.0]
-
KEYReturns the value from a `data-*` where `*` is the `KEY` (e.g. `data-KEY="value"`)
- The
el.method returns abooleanthat is determined by comparing thedata-KEY="VALUE"for theeland itsancestor treewith that of thedata-KEY="VALUE"fromev.and itsancestor tree.
data-KEY:
el does not have
-
el ancestor does not have
-
ev does not have
-
ev ancestor does not have
-
returns
false [generated-00000]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor does not have
-
ev does not have
-
ev ancestor has
-
returns
false [generated-00010]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor does not have
-
ev has
-
ev ancestor does not have
-
returns
false [generated-00100]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor does not have
-
ev has
-
ev ancestor has
-
returns
false [generated-00110]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev does not have
-
ev ancestor does not have
-
returns
false [generated-01000]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev does not have
-
ev ancestor has
-
values do not match
-
is
false [generated-01010]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev does not have
-
ev ancestor has
-
values match
-
is
true [generated-01011]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev has
-
ev ancestor does not have
-
values do not match
-
is
false [generated-01100]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev has
-
ev ancestor does not have
-
values match
-
is
true [generated-01101]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev has
-
ev ancestor has
-
values do not match
-
is
false [generated-01110]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev has
-
ev ancestor has
-
values match
-
is
true [generated-01111]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev does not have
-
ev ancestor does not have
-
returns
false [generated-10000]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev does not have
-
ev ancestor has
-
values do not match
-
is
false [generated-10010]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev does not have
-
ev ancestor has
-
values match
-
is
true [generated-10011]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev has
-
ev ancestor does not have
-
values do not match
-
is
false [generated-10100]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev has
-
ev ancestor does not have
-
values match
-
is
true [generated-10101]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev has
-
ev ancestor has
-
values do not match
-
is
false [generated-10110]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev has
-
ev ancestor has
-
values match
-
is
true [generated-10111]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev does not have
-
ev ancestor does not have
-
returns
false [generated-11000]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev does not have
-
ev ancestor has
-
values do not match
-
is
false [generated-11010]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev does not have
-
ev ancestor has
-
values match
-
is
true [generated-11011]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev has
-
ev ancestor does not have
-
values do not match
-
is
false [generated-11100]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev has
-
ev ancestor does not have
-
values match
-
is
true [generated-11101]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev has
-
ev ancestor has
-
values do not match
-
is
false [generated-11110]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev has
-
ev ancestor has
-
values match
-
is
true [generated-11111]
Test Button
waiting
window. =
el.propMatchesTarget(KEY) [added: 7.0.0]
-
KEYThe
KEYportion of adata-KEY="VALUE"attribute.
- The
el.method returns abooleanthat is determined by comparing thedata-KEY="VALUE"for theeland its ancestor tree with that of thedata-KEY="VALUE"fromev.and its ancestor tree.
data-KEY:
el does not have
-
el ancestor does not have
-
ev does not have
-
ev ancestor does not have
-
returns
false [generated-00000]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor does not have
-
ev does not have
-
ev ancestor has
-
returns
false [generated-00010]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor does not have
-
ev has
-
ev ancestor does not have
-
returns
false [generated-00100]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor does not have
-
ev has
-
ev ancestor has
-
returns
false [generated-00110]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev does not have
-
ev ancestor does not have
-
returns
false [generated-01000]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev does not have
-
ev ancestor has
-
values do not match
-
is
false [generated-01010]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev does not have
-
ev ancestor has
-
values match
-
is
true [generated-01011]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev has
-
ev ancestor does not have
-
values do not match
-
is
false [generated-01100]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev has
-
ev ancestor does not have
-
values match
-
is
true [generated-01101]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev has
-
ev ancestor has
-
values do not match
-
is
false [generated-01110]
Test Button
waiting
window. =
data-KEY:
el does not have
-
el ancestor has
-
ev has
-
ev ancestor has
-
values match
-
is
true [generated-01111]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev does not have
-
ev ancestor does not have
-
returns
false [generated-10000]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev does not have
-
ev ancestor has
-
values do not match
-
is
false [generated-10010]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev does not have
-
ev ancestor has
-
values match
-
is
true [generated-10011]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev has
-
ev ancestor does not have
-
values do not match
-
is
false [generated-10100]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev has
-
ev ancestor does not have
-
values match
-
is
true [generated-10101]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev has
-
ev ancestor has
-
values do not match
-
is
false [generated-10110]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor does not have
-
ev has
-
ev ancestor has
-
values match
-
is
true [generated-10111]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev does not have
-
ev ancestor does not have
-
returns
false [generated-11000]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev does not have
-
ev ancestor has
-
values do not match
-
is
false [generated-11010]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev does not have
-
ev ancestor has
-
values match
-
is
true [generated-11011]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev has
-
ev ancestor does not have
-
values do not match
-
is
false [generated-11100]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev has
-
ev ancestor does not have
-
values match
-
is
true [generated-11101]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev has
-
ev ancestor has
-
values do not match
-
is
false [generated-11110]
Test Button
waiting
window. =
data-KEY:
el has
-
el ancestor has
-
ev has
-
ev ancestor has
-
values match
-
is
true [generated-11111]
Test Button
waiting
window. =
el.propToFloat(KEY) [added: 7.0.0]
-
KEYReturns the value from a `data-*` where `*` is the `KEY` (e.g. `data-KEY="value"`)
- Looks for a
data-KEYattribute from theev.element in itsev..property that matchesKEYand returns the value as a string. - If the
ev.element does not have adata-KEYthe process looks for ancestors with adata-KEYattribute. The first one that's found gets used. - If neither the
ev.element or any of its ancestors have thedata-KEYattribute the returned value isundefined.
return the value of a
data-KEY
attribute from the
el
as a
float [generated-0010]
waiting
window. =
return a
float if
el
does not have
data-KEY
attribute, but an ancestor
doES have
a
data-KEY
attribute [generated-0020]
waiting
window. =
return
floatfrom
elif
el
has
a
data-KEY
attribute and an ancestor of
el
has
a
data-KEY
attribute [generated-0030]
waiting
window. =
return
undefined
if
el
does not have
a
data-KEY
attribute and ancestors
do not have
data-KEY
attributes [generated-0040]
waiting
window. =
return
NaN
if
el
has
a
data-KEY
attribute but it
is not
a number [generated-0050]
waiting
window. =
return
NaN
if
el
does not have
a
data-KEY
but an ancestor
does have
a
data-KEY
attribute but it
is not
a number [generated-0060]
waiting
window. =
el.propToInt(KEY) [added: 7.0.0]
-
KEY
The KEY portion of
data-KEYattribute of theel.
-
Looks for a
data-KEYattribute in theel.and returns the value as a integer (Int) by running it through. -
If the
el.does not contain adata-KEYattribute the method walks up the doM looking for an ancestors that does. The nearest one returned as an integer (Int) if any are found. -
If a
data-KEYis found but it's not a number, thenundefinedis returned. -
If neither the
elor any of its ancestors have adata-KEYattribute, thenundefinedis returned.
return Int if
el
has
a
data-KEY
attribute and it's an Int [generated-0010]
waiting
window. =
return Int if
el
does not have
a
data-KEY
attribute, but an ancestor
doES have
a
data-KEY
attribute [generated-0020]
waiting
window. =
return Int from
elif
el
has
a
data-KEY
attribute and an ancestor of
el
has
a
data-KEY
attribute [generated-0030]
waiting
window. =
return
undefined
if
el
does not have
a
data-KEY
attribute
and ancestors
do not have
data-KEY
attributes [generated-0040]
waiting
window. =
return
NaN
if
el
has
a
data-KEY
attribute
but it
is not
a number [generated-0050]
waiting
window. =
return
NaN
if
el
does not have
a
data-KEY
but an ancestor
does have
a
data-KEY
attribute
but it
is not
a number [generated-0060]
waiting
window. =
Properties
el.bittyId [added: 7.0.0]
-
Every element inside a
tag gets abittyidproperty assigned to it'sdatasetwith a UUID value (i.e.el..). -
el.is an alias to that value.
bittyId exists [generated-0010]
waiting
window. =
el.bittyParent [added: 7.0.0]
- A reference to the
that contains the.
reference bitty parent when it exists above child [generated-0010]
waiting
window. =
bitty element references parent bitty element instead of itself [generated-0020]
<!--
TOdo: Set up template to handle this.
<bitty-7-0 data-connect="BittyparentElWrapper">
<bitty-7-0
data-connect="BittyparentEl"
data-init="runTestelpropertieselbittyParentgenerated0020"
data-expects="true"
>
</bitty-7-0>
</bitty-7-0>
--> window. =
null if bitty element has no other bitty elements above it [generated-0030]
<!--
TOdo: set up template to handle this
<bitty-7-0
data-connect="BittyparentEl"
data-init="runTestelpropertieselbittyParentgenerated0030"
data-expects="null"
></bitty-7-0>
--> window. =
el.isSender [added: 7.0.0]
- Boolean that returns
trueif theev.element that sent the signal is also the receiving element.
el is sender [generated-0010]
waiting
window. =
el is not sender [generated-0020]
waiting
window. =
data-use returns true [generated-0030]
waiting
window. =
data-init returns true [generated-0040]
waiting
window. =
el.isTarget [added: 7.0.0]
- Boolean that
returns
trueif theev.element that initiated the signal is also the receiving element.
el is target returns true [generated-0010]
waiting
window. =
el is not target returns false [generated-0020]
waiting
window. =
data-use returns true [generated-0030]
waiting
window. =
data-init returns true [generated-0040]
waiting
window. =
el.value [added: 7.0.0]
- The standard
el.from an HTML Element.
value exists [generated-0010]
waiting
window. =
value does not exist [generated-0020]
waiting
window. =
el.valueToFloat [added: 7.0.0]
- Alias for
.
If
el has a
value and it's a
floatthen return it [generated-0010]
waiting
window. =
If
el has a
value but it's not a
float then return
NaN [generated-0020]
waiting
window. =
If
el does not have a
value then return
undefined [generated-0030]
waiting
window. =
If
el has a
value but it's empty the return
undefined [generated-0040]
waiting
window. =
el.valueToInt [added: 7.0.0]
- An alias for
.
If
el has a
value and it is an
int then return it [generated-0010]
waiting
window. =
If
el has a
value but it's not an
int then return
NaN [generated-0020]
waiting
window. =
If
el does not have a
value then return
undefined [generated-0030]
waiting
window. =
If
el has a
value but it is empty, then return
undefined [generated-0040]
waiting
window. =