public function loadScript($src, $defer = FALSE, $async = FALSE, $attribs=[]) {
		
		// force casting to array
		$attribs = (array)$attribs;
		
		// the script object
		$script = new \stdClass();
		
		$script->src = $src;
		
		if ($defer)	$script->defer = TRUE;
		if ($async) $script->async = TRUE;

		// list of valid type attributes
		$validTypes = ['text/javascript','text/ecmascript','application/javascript','application/ecmascript'];
		
		if (isset($attribs['type']) and in_array($attribs['type'], $validTypes)) {
			$script->type = $attribs['type'];
		}

		if (isset($attribs['integrity']) and strlen(trim($attribs['integrity']))) {
			$script->integrity = $attribs['integrity'];
		}
		
		if (isset($attribs['crossorigin']) and strlen(trim($attribs['crossorigin']))) {
			$script->crossorigin = $attribs['crossorigin'];
		}
		
		if (isset($attribs['charset']) and strlen(trim($attribs['charset']))) {
			$script->charset = $attribs['charset'];
		}
		
		$this->scriptFiles[] = $script;
		
	}