Assets.common Class
Access point: ac.assets.* Provides methods for adding HTML assets to a page.
Item Index
Methods
- addAsset
- addAssets
- addBlob
- addCss
- addJs
- getAssets
- getUrl
- mixAssets
- preLoadImage deprecated
- preLoadImages deprecated
Methods
addAsset
(
-
type -
content -
location
Parameters:
-
typeStringcss|js|blob
-
contentStringA string of data.
-
locationStringEither "top" or "bottom".
addAssets
(
-
assets
Parameters:
-
assetsObjectby location (top|bottom) & type (css|js|blob)
addBlob
(
-
content -
location
Method for adding a Blob of data to the page. This can be used for adding custom "script" or "style" blocks.
Parameters:
-
contentStringA string of data.
-
locationStringEither "top" or "bottom".
addCss
(
-
link -
location
Method for adding a CSS file to the page.
Parameters:
-
linkStringA URL (./local.css converts to /static/mojit_type/assets/local.css).
-
locationStringEither "top" or "bottom".
addJs
(
-
link -
location
Method for adding a JS file to the page.
Parameters:
-
linkStringA URL (./local.css converts to /static/mojit_type/assets/local.css).
-
locationStringEither "top" or "bottom".
getAssets
()
Object
Returns:
Object:
assets by location (top|bottom) & type (css|js|blob)
getUrl
(
String
-
path
Parameters:
-
pathStringof asset, relative
Returns:
String:
mixAssets
(
Object
-
to -
from
Parameters:
-
toObject -
fromObject
Returns:
Object:
preLoadImage
(
deprecated
-
url
Parameters:
-
urlString
preLoadImages
(
deprecated
-
url
Parameters:
-
urlarray.
