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

class Javascript extends \BigPipe\Resource\Javascript {
	public function __construct(string $customID, string $resourceURL) {
		parent::__construct(...func_get_args());

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