aboutsummaryrefslogtreecommitdiffstats
path: root/include/classes/Debugging/Resource/Stylesheet.php
blob: abd904579de0fb0054fb7de5951d52547fa4d2d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
namespace Debugging\Resource;

class Stylesheet extends \BigPipe\Resource\Stylesheet {
	public function __construct(?string $id, string $url) {
		parent::__construct(...func_get_args());

		foreach(['INIT', 'LOAD', 'DONE'] as $phase) {
			$code = 'console.log("PhaseDoneJS for Stylesheet %%c#%s%%c: %s", "color:#4169E1", "color:inherit")';
			$this->addPhaseDoneJS(constant("self::PHASE_$phase"), sprintf($code, $this->getID(), $phase));
		}
	}
}