%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/bitrix/www/bitrix/modules/pull/demo/pull/components/pull.test/templates/.default/
Upload File :
Create Path :
Current File : /home/bitrix/www/bitrix/modules/pull/demo/pull/components/pull.test/templates/.default/template.php

<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();?>

<button onclick="sendRealtimeEvent();">Send Event</button>

<div id="pull-events-box"></div>

<script type="text/javascript">
	function sendRealtimeEvent()
	{
		BX.ajax({
			url: '<?=$arResult['ajaxLink']?>',
			method: 'POST',
			data: {'SEND' : 'Y', 'sessid': BX.bitrix_sessid()}
		});
	}

	BX.ready(function(){
		BX.addCustomEvent("onPullEvent", function(module_id,command,params) {
			if (module_id == "test" && command == 'check')
			{
				console.log(module_id,command,params);
				BX('pull-events-box').innerHTML += params.TIME+'<br>';
			}
		});
		BX.PULL.extendWatch('PULL_TEST');
	});
</script>

Zerion Mini Shell 1.0