diff options
Diffstat (limited to 'include/classes/Debugging/Pagelet.php')
-rw-r--r-- | include/classes/Debugging/Pagelet.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/classes/Debugging/Pagelet.php b/include/classes/Debugging/Pagelet.php new file mode 100644 index 0000000..a06ff4c --- /dev/null +++ b/include/classes/Debugging/Pagelet.php @@ -0,0 +1,14 @@ +<?php +namespace Debugging; + +class Pagelet extends \BigPipe\Pagelet { + public function __construct($customID = NULL, $priority = self::PRIORITY_NORMAL) { + parent::__construct(...func_get_args()); + + foreach(['INIT', 'LOADCSS', 'HTML', 'LOADJS', 'DONE'] as $phase) { + $code = 'console.log("PhaseDoneJS for Pagelet %%c#%s%%c: %s", "color:#008B45", "color:inherit")'; + $this->addPhaseDoneJS(constant("self::PHASE_$phase"), sprintf($code, $this->getID(), $phase)); + } + } +} +?>
\ No newline at end of file |