blob: 41eeb8f20ca333421ff8a97a31c3df300c44786d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<?php
namespace Debugging;
class Pagelet extends \BigPipe\Pagelet {
public function __construct(string $customID = NULL, int $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));
}
}
}
|