We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExternalInterface.call("setTimeout", _jsCallbackFunction + "('" + ExternalInterface.objectID + "','" + eventName + "'," + eventValues + ")",0);
Use nextTick implementation (example from https://github.com/dfilatov/vow/blob/master/lib/vow.js)
nextTick
var undef, nextTick = (function() { var fns = [], enqueueFn = function(fn) { return fns.push(fn) === 1; }, callFns = function() { var fnsToCall = fns, i = 0, len = fns.length; fns = []; while(i < len) { fnsToCall[i++](); } }; if(typeof setImmediate === 'function') { // ie10, nodejs >= 0.10 return function(fn) { enqueueFn(fn) && setImmediate(callFns); }; } if(typeof process === 'object' && process.nextTick) { // nodejs < 0.10 return function(fn) { enqueueFn(fn) && process.nextTick(callFns); }; } if(global.postMessage) { // modern browsers var isPostMessageAsync = true; if(global.attachEvent) { var checkAsync = function() { isPostMessageAsync = false; }; global.attachEvent('onmessage', checkAsync); global.postMessage('__checkAsync', '*'); global.detachEvent('onmessage', checkAsync); } if(isPostMessageAsync) { var msg = '__promise' + +new Date, onMessage = function(e) { if(e.data === msg) { e.stopPropagation && e.stopPropagation(); callFns(); } }; global.addEventListener? global.addEventListener('message', onMessage, true) : global.attachEvent('onmessage', onMessage); return function(fn) { enqueueFn(fn) && global.postMessage(msg, '*'); }; } } var doc = global.document; if('onreadystatechange' in doc.createElement('script')) { // ie6-ie8 var createScript = function() { var script = doc.createElement('script'); script.onreadystatechange = function() { script.parentNode.removeChild(script); script = script.onreadystatechange = null; callFns(); }; (doc.documentElement || doc.body).appendChild(script); }; return function(fn) { enqueueFn(fn) && createScript(); }; } return function(fn) { // old browsers enqueueFn(fn) && setTimeout(callFns, 0); }; })();
And pass params as objects instead of concatenating it to string.
The text was updated successfully, but these errors were encountered:
@stereobooster Thanks for this tip. We'll explore this and see how feasible is the implementation of this approach
Sorry, something went wrong.
No branches or pull requests
Use
nextTick
implementation (example from https://github.com/dfilatov/vow/blob/master/lib/vow.js)And pass params as objects instead of concatenating it to string.
The text was updated successfully, but these errors were encountered: