netlog_viewer/netlog_viewer/ui_webui_resources_js_util.js
function disableTextSelectAndDrag(opt_allowSelectStart, opt_allowDragStart) {
  // Disable text selection.
  document.onselectstart = function(e) {
    if (!(opt_allowSelectStart && opt_allowSelectStart.call(this, e)))
      e.preventDefault();
  };

  // Disable dragging.
  document.ondragstart = function(e) {
    if (!(opt_allowDragStart && opt_allowDragStart.call(this, e)))
      e.preventDefault();
  };
}
function disableTextSelectAndDrag(opt_allowSelectStart, opt_allowDragStart) {
  // Disable text selection.
  document.onselectstart = function(e) {
    if (!(opt_allowSelectStart && opt_allowSelectStart.call(this, e)))
      e.preventDefault();
  };

  // Disable dragging.
  document.ondragstart = function(e) {
    if (!(opt_allowDragStart && opt_allowDragStart.call(this, e)))
      e.preventDefault();
  };
}
function disableTextSelectAndDrag ( opt_allowSelectStart , opt_allowDragStart ) { // Disable text selection. document . onselectstart = function ( e ) { if ( ! ( opt_allowSelectStart && opt_allowSelectStart . call ( this , e ) ) ) e . preventDefault ( ) ; } ; // Disable dragging. document . ondragstart = function ( e ) { if ( ! ( opt_allowDragStart && opt_allowDragStart . call ( this , e ) ) ) e . preventDefault ( ) ; } ; }
Disables text selection and dragging, with optional whitelist callbacks.
@param {function(Event):boolean=} opt_allowSelectStart Unless this function
is defined and returns true, the onselectionstart event will be
surpressed.
@param {function(Event):boolean=} opt_allowDragStart Unless this function
is defined and returns true, the ondragstart event will be surpressed.
Disables text selection and dragging with optional whitelist callbacks .