code: function getDocument(element, callback) {
                          //Opera 12 seem to call the object.onload before the actual document has been created.
                          //So if it is not present, poll it with an timeout until it is present.
                          //TODO: Could maybe be handled better with object.onreadystatechange or similar.
                          if(!element.contentDocument) {
                              setTimeout(function checkForObjectDocument() {
                                  getDocument(element, callback);
                              }, 100);
  
                              return;
                          }
  
                          callback(element.contentDocument);
                      }
docs: /*jshint validthis: true