Type: boolean
Default: false
When true
and set in the csPageOptions
this option prevents the cloudsponge
object from performing a full initialization. Before the contact picker is ready, you must call cloudsponge.load()
from your code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<script> | |
// statically declare your cloudsponge options *before* including your widget script | |
window.csPageOptions = { | |
// you can set your configuration options here | |
// ... | |
// setting lazyLoad to true will delay loading the cloudsponge object | |
// you must call cloudsponge.load() before any interaction with the widget | |
// NB: lazyLoad is ignored after consent is provided in the inlineOauth flow | |
lazyLoad: true | |
}; | |
</script> | |
<!-- | |
Include the script anywhere on your page, usually in the head | |
(don't forget to replace `localhost-only` with your CloudSponge key) | |
--> | |
<script src="//api.cloudsponge.com/widget/localhost-only.js"></script> | |
<!-- This simple example lets you click a link to load the cloudsponge object --> | |
<a href="#" onclick="cloudsponge.load()">Load Widget!</a> | |
<a class="cloudsponge-launch">Add from Address Book</a> | |
<textarea class="cloudsponge-contacts"></textarea> | |
</body> | |
</html> |