loads images and appends them to the assets object
Name
Type
Description
img
String
image path
key
String
object key to reference the image in the $w.assets object
load_audio -> {Void}
loads audio files and appends them to the assets object
Name
Type
Description
au
String
image path
key
String
object key to reference the audio in the $w.assets object
load_link -> {Boolean}
appends the link tag, generally used for css
there is currently limited support for onload of stylesheets
and frankly, I don't think its that important...css loads pretty fast
and browsers pick up the rules on the fly.
Name
Type
Description
l
Object
Name
Type
Description
rel
String
link rel=""
href
String
path to target file
key
String
object key to reference the link in the $w.assets object
load_script -> {Boolean}
this does not currently contain an onload for external libraries
either load them with the script tag as normal or check if the
class/function etc exists in your own code
Name
Type
Description
l
Object
Name
Type
Description
src
String
path to file
type
String
file type
integrity
String
crossorigin
String
key
String
object key to reference the script in the $w.assets object
set_error -> {Void}
sets an error message in a local array
Name
Type
Description
e
String
the error message
has_error -> {Boolean}
if the local variable error has errors they will be dumped to the console if logs are on