Merge pull request #16 from ONLYOFFICE/feature/pre5.0.3

waiting for an event to be subscribed
This commit is contained in:
Alexey Golubev 2017-10-13 17:42:31 +03:00 committed by GitHub
commit 1f8766ce68

View file

@ -134,7 +134,10 @@ require([
// api.asc_registerCallback('asc_onOpenDocumentProgress', onOpenDocument);
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
api.sendFromReporter('i:am:ready');
setTimeout(function(){
// waiting for an event to be subscribed
api.sendFromReporter('i:am:ready');
}, 500);
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {