Make sure DOM element is ready and clean it
17340
function(suppliedConfig) {

    var targetElement = suppliedConfig.el || getConfig().el;

    rootTarget = $(targetElement);

    if (rootTarget.length === 0) {
      throw triggerError('No target DOM element was found (' + targetElement + ')');
    }

    rootTarget.addClass('bookingjs');
    rootTarget.children(':not(script)').remove();

  }
1135027
function() {
		if (!ready) {
			ready = true;
			//Call the stack of onload functions in given context or window object
			for (var i=0, len=stack.length; i < len; i++) {
				stack[i][0].call(stack[i][1]);	
			}
			//Clean up after the DOM is ready
			if (document.removeEventListener) {
				document.removeEventListener("DOMContentLoaded", onStateChange, false);
			}
			//Clear the interval	
			clearInterval(timer);
			//Null the timer and event handlers to release memory
			document.onreadystatechange = window.onload = timer = null;
		}
	}
900842
function(e) {
                var EU = YAHOO.util.Event;
                if (!EU.DOMReady) {
                    EU.DOMReady=true;

                    // Fire the content ready custom event
                    EU.DOMReadyEvent.fire();

                    // Remove the DOMContentLoaded (FF/Opera)
                    EU._simpleRemove(document, "DOMContentLoaded", EU._ready);
                }
            }
875303
def handle_data(self, data):
        
        if self.current_parent_element['tag'] == '':
            self.cleaned_html += '<p>'
            self.current_parent_element['tag'] = 'p'

        self.cleaned_html += data
888078
function cleanDom(dom) {
  var result = [];
  for(var i=0;i<dom.length;i++) {
    var node = dom[i];
    //console.log(node);
    if(node.type=='directive') continue;
    if(node.type=='tag') {
      var k = node.name;
      var v = node.attribs || {};
      var obj = {};
      obj[k] = v;
      if(node.hasOwnProperty("children")) {
        //console.log(node.children);
        //console.log(cleanDom(node.children));
        _.each(cleanDom(node.children), function(o) { 
          if(!_.isObject(o) || !_.isObject(v)) {
            if(_.isObject(v)) {
              if(_.size(v)==0) {
                v=o;
              } else {
                v['_text']=o;
              }
            }  else if(_.isArray(v)) {
              v.push(o); 
            } else {
              v=[v];
              v.push(o);
            }
            obj[k] = v;
          } else {
            // first step is to merge same key items
            // basically convert them to arrays
            var sameKeys = _.intersection(_.keys(o), _.keys(v));
            _.each(sameKeys, function(k) {
              if(!_.isArray(v[k])) {
                v[k]=[v[k]];
              }
              v[k]=v[k].concat(o[k]);
            });
            var remainingObj = _.omit(o, sameKeys);
            _.extend(v, remainingObj); 
          }
        });
      }
      result.push(obj);
    }
    if(node.type=='text') {
      result.push(node.data);
    }
  }
  //console.log(result);
  return result;
}
1055007
function(e) {

                if (!loadComplete) {
                    loadComplete = true;
                    var EU = YAHOO.util.Event;

                    // Just in case DOMReady did not go off for some reason
                    EU._ready();

                    // Available elements may not have been detected before the
                    // window load event fires. Try to find them now so that the
                    // the user is more likely to get the onAvailable notifications
                    // before the window load notification
                    EU._tryPreloadAttach();

                }
            }
803836
function cleanup () {
    if (!ctrl.hidden) {
      $mdUtil.enableScrolling();
    }

    angular.element($window).off('resize', debouncedOnResize);

    if (elements){
      var items = ['ul', 'scroller', 'scrollContainer', 'input'];
      angular.forEach(items, function(key){
        elements.$[key].remove();
      });
    }
  }
344971
def refresh_until_present(timeout = 30)
      message = "waiting for #{@selector.inspect} to become present"
      Watir::WaitWithRefresh.refresh_until(browser, timeout, message) { present? }
    end
1310960
function onReadystatechange(e) {

	if (!(e instanceof Event)) {
		throw new TypeError('Invalid event was given');
	}

	if (document.readyState == 'interactive') {
		makeReady.call(this);
	}

	if (document.readyState == 'complete') {
		makeLoaded.call(this);
	}
}
714975
function () {
        if (this._input.value && this._input.value.length > 0) {
            u.addClass(this.element, this._CssClasses.IS_DIRTY);
        } else {
            u.removeClass(this.element, this._CssClasses.IS_DIRTY);
        }
    }
1169074
function checkElement(node, attr, includeScope) {
  var elements = getElements(node, attr);

  if (includeScope && node.hasAttribute(attr)) {
    elements.push(node);
  }

  return elements;
}
133190
function whenDocumentReady( callback ) {
   return new Promise( ( resolve, reject ) => {
      function ready() {
         try {
            resolve( callback() );
         }
         catch( err ) {
            reject( err );
         }
      }

      if( document.readyState === 'complete' || document.readyState === 'interactive' ) {
         ready();
      }
      else {
         document.addEventListener( 'DOMContentLoaded', ready );
      }
   } );
}
1270076
function ready () {

    var hash = location.hash.substr( 1 );
    if(hash !=='') demoName = hash;
    editor.load('demos/' + demoName + '.js');

}
735842
function(element, callback, nowait) {
    var self = this;
    if (!nowait) {
      this.waitForPage(function() {
        self.waitForElement(element, callback, true);
      });
    }
    else {
      var loadWait = function() {
        setTimeout(function() {
          self.waitForElement(element, callback, true);
        }, 100);
      };
      if (nowait) {
        getPage(function(page) {
          page.evaluate(function(element) {
            var element = jQuery(element);
            return ((element.length > 0) && element.is(':visible'));
          }, function(found) {
            if (found) {
              self.debug('Element ' + element + ' found');
              callback.call(self);
            }
            else {
              loadWait();
            }
          }, element);
        });
      }
      else {
        loadWait();
      }
    }
  }
400389
function() {
		// Make sure that the DOM is not already loaded
		if ( !jQuery.isReady ) {
			// Remember that the DOM is ready
			jQuery.isReady = true;

			// If there are functions bound, to execute
			if ( jQuery.readyList ) {
				// Execute all of them
				jQuery.each( jQuery.readyList, function(){
					this.call( document, jQuery );
				});

				// Reset the list of functions
				jQuery.readyList = null;
			}

			// Trigger any bound ready events
			jQuery(document).triggerHandler("ready");
		}
	}
550890
public static void ensureMouseOver(Element element) {

        NativeEvent nativeEvent = Document.get().createMouseOverEvent(
            0,
            0,
            0,
            0,
            0,
            false,
            false,
            false,
            false,
            0,
            null);
        element.dispatchEvent(nativeEvent);
    }
837627
function documentReady(callback) {
  document.readyState === "interactive" || document.readyState === "complete" ? callback() : document.addEventListener("DOMContentLoaded", callback);
}