Beispiel #1
0
 /**
  *
  * gibt einen Array mit HTML Tags zurück die Script-Tags sind und jeweils ein JS File laden
  * @return HTMLTag[]
  */
 public function getHTML()
 {
     $html = array();
     foreach ($this->enqueued as $alias) {
         $html[] = js::load($this->url . $this->files[$alias]['name'])->setOption('br.closeTag', FALSE);
     }
     return $html;
 }
Beispiel #2
0
 public function getHTML()
 {
     $html = array();
     $html[] = Helper::load($this->requirejsSource)->setAttribute('data-main', $this->main)->setOption('br.closeTag', FALSE);
     foreach ($this->enqueued as $alias) {
         $html[] = Helper::load($this->files[$alias]['name'])->setOption('br.closeTag', FALSE);
     }
     return $html;
 }
Beispiel #3
0
 /**
  * @return Psc\HTML\Tag
  */
 public function loadConditionalJS($url, $condition)
 {
     $this->head->content[$url] = '<!--[if ' . $condition . ']>' . ($script = js::load($url)) . '<![endif]-->';
     return $script;
 }