Problem Description
The OnReady trigger will never be... triggered... if the facebook API is ready before the first call to the on start of layout.
I believe it's because, in the runtime Runtime.prototype.trigger function, you're preventing any trigger to fire if the sheet isn't active yet
Attach a Capx
Since the facebook plugin depends on a facebook id and the example is very small, I'll just post an image
Description of Capx
Either trigger both console log action, or only the OnReady if the facebook API takes time to load
Steps to Reproduce Bug
- press F5 or Ctrl+F5
- look at the console output
Observed Result
Kind of race condition.
Expected Result
Either:
The facebook plugin call the window.fbAsyncInit before the start of layout
which should result in the OnReady being triggered, or put on hold to be triggered just after the start of layout
-> this is the problem
Or:
The facebook plugin call the window.fbAsyncInit after the start of layout
In this case, the onReady not being true, the part in the on start of layout will not execute
The OnReady is triggered
-> this is already working as expected
Of course, a simple thing to do for now would be
Facebook: isReady
System: trigger once
-> do things[/code:10wumhtn]
[b]Construct 2 Version ID[/b]
r169