blob: a8a23d78df555114ca3cd4d535e3a18e07946734 (
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 $id = 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));
}
}
}
|