Home / Admin / getcustomvariable.js
Duplicate Snippet

Embed Snippet on Your Site

getcustomvariable.js

Code Preview
html
<script type="text/javascript">
	document.addEventListener('om.Dtr.init', function(event) {
		/**
		 * API method for retrieving a custom variable. Must be accessed via the app object.
		 *
		 * @param string $key  The custom variable key to retrieve.
		 * @return string|bool The value of the custom variable key or false if not found.
		 */
		event.detail.Dtr.getCustomVariable('foo');
	});
</script>

Comments

Add a Comment