aboutsummaryrefslogtreecommitdiffstats
path: root/include/classes/BigPipe/Resource/JS.php
blob: f9e109bf63a2087f4244a45ef50275943be4be9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
namespace BigPipe\Resource;

class JS extends \BigPipe\Resource {

	#===============================================================================
	# Build resource
	#===============================================================================
	public function __construct($resourceURL) {
		parent::__construct(parent::TYPE_JAVASCRIPT, $resourceURL);
	}

	#===============================================================================
	# Render resource HTML
	#===============================================================================
	public function renderHTML() {
		return sprintf('<script data-id="%s" src="%s"></script>', $this->getID(), $this->getURL());
	}
}
?>