Community
Participate
Working Groups
The current implementation throws an error in javascript when a browser function is called while another is pending. There should be a way to allow subsequent calls to be queued and execute when the previous is completed.
Cole, could you outline a scenario where a browser function could be called when another is pending? As JavaScript is a single-treaded and execution is done in a synchronous request, for me this is only possible when browser function is called in the server response (probably by Browser#execute).
I'm not sure what exactly is happening yet, but we are getting the error message on the client. We are using both Browser#execute and BrowserFunction for two-way communication between the iframe and RAP, so that could be causing the issue. Is it possible that the synchronous request is not truly synchronous and a user-initiated event (like a click) is processed in the iframe while the request is pending?
It turns out it was caused by the BrowserFunction on the server side calling (very indirectly) a Browser#execute which triggered another call to the same BrowserFunction from javascript. It shouldn't be doing that for this case, so I fixed my code. I assume this behavior is not supported?