diff options
author | Thomas Lange <code@nerdmind.de> | 2016-06-23 13:10:24 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2016-06-23 13:16:30 +0200 |
commit | c5637489e603c588fca41e2b7bd4345b67914f33 (patch) | |
tree | 5a1e8cc8f9558105422c24ddf8c1b8067df0a081 /include/classes/BigPipe/DemoPagelet.php | |
parent | 102d2dc24505f4ce7fe6601b21a7e2e414f613cb (diff) | |
download | bigpipe-c5637489e603c588fca41e2b7bd4345b67914f33.tar.gz bigpipe-c5637489e603c588fca41e2b7bd4345b67914f33.tar.xz bigpipe-c5637489e603c588fca41e2b7bd4345b67914f33.zip |
Pagelets executed immediately; Dependency feature; Several improvements
+ All pagelets are now executed immediately on arrive.
+ A "Display Dependency" feature was added. If you give a pagelet an dependency, it will first be executed if all pagelets, who registered as dependency, are displayed.
+ If BigPipe.reset() is called, the function loops through each Resource and executes Resource.abortLoading(). This removes the <link> or <script> element from DOM and removes the onload callbacks. This is to prevent that an onload callback from a previous page are executed while the user has already changes the page asynchronously and a resource from the previous page wasn't already loaded.
Diffstat (limited to 'include/classes/BigPipe/DemoPagelet.php')
-rwxr-xr-x | include/classes/BigPipe/DemoPagelet.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/classes/BigPipe/DemoPagelet.php b/include/classes/BigPipe/DemoPagelet.php index 83689ba..adb9f89 100755 --- a/include/classes/BigPipe/DemoPagelet.php +++ b/include/classes/BigPipe/DemoPagelet.php @@ -3,8 +3,8 @@ namespace BigPipe; class DemoPagelet extends Pagelet { - public function __construct($customID = NULL, $priority = Pagelet::PRIORITY_NORMAL) { - parent::__construct($customID, $priority); + public function __construct($customID = NULL, $priority = Pagelet::PRIORITY_NORMAL, array $dependencies = []) { + parent::__construct($customID, $priority, $dependencies); $message = '%s: PhaseDoneJS for phase %s'; |