code: function () {
          var doc;
  
          // IE9 does implement createDocument(); however, using it will cause the browser to leak memory on page unload.
          // Here, we test for presence of createDocument() plus IE's proprietary documentMode attribute, which would be
                  // less than 10 in the case of IE9 and below.
          if (document.implementation.createDocument === undefined ||
                          document.implementation.createDocument && document.documentMode && document.documentMode < 10) {
              doc = this._getIEXmlDom();
              doc.appendChild(doc.createElement('strophe'));
          } else {
              doc = document.implementation
                  .createDocument('jabber:client', 'strophe', null);
          }
  
          return doc;
      }
docs: PrivateFunction: _makeGenerator
  _Private_ function that creates a dummy XML DOM document to serve as
  an element and text node generator.