   needsHeader = (str) -> isXml(str) && !hasXmlHeader(str)
   xmlHeader = '<?xml version="1.0" ?>'
   prependHeader = (str) -> xmlHeader + str
-  activeXSupported = ActiveXObject? || 'ActiveXObject' in window
+  activeXSupported = ActiveXObject? || 'ActiveXObject' of window
 
   tryCreateActiveX = (objIds...) ->
     return null unless activeXSupported

        processor.transformToDocument(xmlDoc)
      else
        processor.transformToFragment(xmlDoc, document)
    else if xmlDoc.transformNode?
      return xmlDoc.transformNode(xsltDoc)
    else if activeXSupported
      xslt = createXSLTemplate()


  newDocument = ->
    d = null
    d ?= createDomDoc()
    d ?= manualCreateElement()
    d ?= document.implementation?.createDocument?("", 'test', null)
