| @@ 452-463 (lines=12) @@ | ||
| 449 | * @param string $uri The webpath to the JavaScript file |
|
| 450 | * @param boolean $async Can the JavaScript be loaded asynchronously? |
|
| 451 | */ |
|
| 452 | public function addJSByURI($uri, $async = true) |
|
| 453 | { |
|
| 454 | $attributes = array('src'=>$uri, 'type'=>'text/javascript'); |
|
| 455 | if($async === true) |
|
| 456 | { |
|
| 457 | $attributes['async'] = true; |
|
| 458 | } |
|
| 459 | $jsTag = $this->createOpenTag('script', $attributes); |
|
| 460 | $closeTag = $this->createCloseTag('script'); |
|
| 461 | $this->addHeadTag($jsTag); |
|
| 462 | $this->addHeadTag($closeTag); |
|
| 463 | } |
|
| 464 | ||
| 465 | /** |
|
| 466 | * Add a Cascading Style Sheet file from its src URI |
|
| @@ 445-456 (lines=12) @@ | ||
| 442 | * @param string $uri The webpath to the JavaScript file |
|
| 443 | * @param boolean $async Can the JavaScript be loaded asynchronously? |
|
| 444 | */ |
|
| 445 | public function addJSByURI($uri, $async = true) |
|
| 446 | { |
|
| 447 | $attributes = array('src'=>$uri, 'type'=>'text/javascript'); |
|
| 448 | if($async === true) |
|
| 449 | { |
|
| 450 | $attributes['async'] = true; |
|
| 451 | } |
|
| 452 | $jsTag = $this->createOpenTag('script', $attributes); |
|
| 453 | $closeTag = $this->createCloseTag('script'); |
|
| 454 | $this->addHeadTag($jsTag); |
|
| 455 | $this->addHeadTag($closeTag); |
|
| 456 | } |
|
| 457 | ||
| 458 | /** |
|
| 459 | * Add a Cascading Style Sheet file from its src URI |
|