         attributes =
           rel      : 'stylesheet'
           href     : url
+        bind       = "load"
+        load       = -> callback null, {app, type, url}
       else
         attributes =
           type     : "text/javascript"

      global.document.head.appendChild (new KDCustomHTMLView {
        domId, tagName, attributes, bind, load
      }).getElement()

      callback null  if type is 'style'

  @destroyScriptElement = (type, identifier)->
    (global.document.getElementById "internal-#{type}-#{identifier}")?.remove()

kd                         = require 'kd'
KDController               = kd.Controller
KDCustomHTMLView           = kd.CustomHTMLView
KDModalView                = kd.ModalView
KDModalViewWithForms       = kd.ModalViewWithForms
KDNotificationView         = kd.NotificationView
KDView                     = kd.View
htmlencode                 = require 'htmlencode'
Promise                    = require 'bluebird'
$                          = require 'jquery'
globals                    = require 'globals'
getFullnameFromAccount     = require './util/getFullnameFromAccount'
registerAppClass           = require './util/registerAppClass'
remote                     = require('./remote').getInstance()
nick                       = require './util/nick'
AppSkeleton                = require './appskeleton'
FSHelper                   = require './util/fs/fshelper'
GitHub                     = require './extras/github/github'
KodingAppSelectorForGitHub = require './commonviews/kodingappselectorforgithub'
ModalViewWithTerminal      = require './commonviews/modalviewwithterminal'

module.exports =

class KodingAppsController extends KDController

  name    = "KodingAppsController"
  version = "0.1"
