     obj = _.reduce(styleString.split(';'), (styles, str) ->
       [name, value] = str.split(':')
       if name and value
-        name = _.str.trim(name)
-        value = _.str.trim(value)
+        name = name.trim()
+        value = value.trim()
         styles[name.toLowerCase()] = value
       return styles
     , {})

    if node.classList?
      node.classList.add(cssClass)
    else if node.className?
      node.className = _.str.trim(node.className + ' ' + cssClass)

  addEventListener: (node, eventName, listener) ->
    node.addEventListener(eventName, (event) ->

_     = require('lodash')

lastKeyEvent = null    # Workaround for fact we can't dispatch keyboard event via javascript

