diff options
author | Thomas Lange <code@nerdmind.de> | 2018-01-21 10:36:32 +0100 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2018-01-21 10:36:32 +0100 |
commit | 7d9b548391780db5d590a7148411b6eb59c189fb (patch) | |
tree | 9269331b5ab34681483a1d3deaf2c7c827644315 /include/classes/Application.php | |
parent | 1a896a9bc176e1af35ee47ebe37cb59d613d2a4f (diff) | |
download | bigpipe-7d9b548391780db5d590a7148411b6eb59c189fb.tar.gz bigpipe-7d9b548391780db5d590a7148411b6eb59c189fb.tar.xz bigpipe-7d9b548391780db5d590a7148411b6eb59c189fb.zip |
Change the mechanism how BigPipe detects the last pagelet
This commit is a preparation for a few further commits and changes the mechanism how the BigPipe javascript library detects the last flushed pagelet from server. Previously, there was a "IS_LAST:true" property in the JSON encoded pagelet object. However, this meant that when the pagelet was sent to the client, the server already needed to know at this point that this is the last pagelet. This can no longer be reliably determined in the future due to smaller restructuring.
Instead of sending "IS_LAST:true" within the JSON encoded pagelet object of the last pagelet, the BigPipe::render() method on the server will display a <script> element which calls "BigPipe.onLastPageletArrived()" after all pagelets have been flushed. This call informs the javascript library that the last pagelet has been flushed and arrived at the client. This is required because the BigPipe javascript library otherwise doesn't know that the last pagelet has been arrived (the javascript library waits for all pagelets to be flushed and displayed until it begins to execute the external javascript resources of every pagelet).
Diffstat (limited to 'include/classes/Application.php')
0 files changed, 0 insertions, 0 deletions