Prevent default triggering
435712
function () {
                this.isDefaultPrevented = true;

                if (this.$) {
                    var e = this.$.orginalEvent;

                    if (e) {
                        if (e.preventDefault) {
                            e.preventDefault();
                        } else {
                            e.returnValue = false;  // IE
                        }
                    }
                }
            }
861716
function fixDefaultChecked( elem ) {
	if ( elem.type === "checkbox" || elem.type === "radio" ) {
		elem.defaultChecked = elem.checked;
	}
}
1102747
def default(event, data):
        """"""
        messages = defaultdict(lambda: 'Avast:')
        messages['start'] = 'Thar she blows!'
        messages['tag'] = 'Thar she blows!'
        messages['stop'] = 'Away into the depths:'
        messages['destroy'] = 'Away into the depths:'
        messages['delete'] = 'Away into the depths:'
        status = get_status(event)
        message = messages[status] + ' %s/%s'
        log.info(message, status, get_id(event))
        log.debug('"data": %s', form_json(data))
24768
private function setToDefault():void
    {
        $this->session = null;
        $this->id = null;
        $this->name = null;
    }
315171
def set_global_defaults(**kwargs):
    """"""

    valid_options = [
        'active', 'selected', 'disabled', 'on', 'off',
        'on_active', 'on_selected', 'on_disabled',
        'off_active', 'off_selected', 'off_disabled',
        'color', 'color_on', 'color_off',
        'color_active', 'color_selected', 'color_disabled',
        'color_on_selected', 'color_on_active', 'color_on_disabled',
        'color_off_selected', 'color_off_active', 'color_off_disabled',
        'animation', 'offset', 'scale_factor',
        ]

    for kw in kwargs:
        if kw in valid_options:
            _default_options[kw] = kwargs[kw]
        else:
            error = "Invalid option '{0}'".format(kw)
            raise KeyError(error)
987098
def on_event_pre(self, e: Event) -> None:
        """"""
        super().on_event_pre(e)
        ct_msg = e.init.get('currentTarget', dict())
        if e.type in ('input', 'change'):
            self._set_attribute('value', ct_msg.get('value'))
            _selected = ct_msg.get('selectedOptions', [])
            self._selected_options.clear()
            for opt in self.options:
                if opt.wdom_id in _selected:
                    self._selected_options.append(opt)
                    opt._set_attribute('selected', True)
                else:
                    opt._remove_attribute('selected')
1228002
function setDefault (opts, key, val) {
  if (opts.schema) {
    opts.prompts = opts.schema;
    delete opts.schema;
  }
  const prompts = opts.prompts || (opts.prompts = {});
  if (!prompts[key] || typeof prompts[key] !== 'object') {
    prompts[key] = {
      'type': 'string',
      'default': val
    };
  }
  else {
    prompts[key]['default'] = val;
  }
}
1191241
def audio_detection_sensitivity(self):
        """"""
        if not self.triggers:
            return None

        for trigger in self.triggers:
            if trigger.get("type") != "audioAmplitude":
                continue

            sensitivity = trigger.get("sensitivity")
            if sensitivity:
                return sensitivity.get("default")

        return None
1239304
def setdefault(self, name: str, default: Any=None) -> Any:
        """"""
        return self.__dict__.setdefault(name, default)
510042
def process_default(self, event):
        
        self._stats_lock.acquire()
        try:
            events = event.maskname.split('|')
            for event_name in events:
                count = self._stats.get(event_name, 0)
                self._stats[event_name] = count + 1
        finally:
            self._stats_lock.release()
1169669
function (event) {
            this._toggleValue();
            if (!this._hasFocus) {
                this._focus();
            }
            if (event.target.tagName.toLowerCase() != "input") {
                event.preventDefault(true);
            }
        }
445538
def default_listener(col_attr, default):
    """"""

    @event.listens_for(col_attr, "init_scalar", retval=True, propagate=True)
    def init_scalar(target, value, dict_):

        if default.is_callable:
            # the callable of ColumnDefault always accepts a context argument
            value = default.arg(None)
        elif default.is_scalar:
            value = default.arg
        else:
            raise NotImplementedError(
                "Can't invoke pre-default for a SQL-level column default")

        dict_[col_attr.key] = value

        return value
1128281
function () {
        var self = this;

        if (!self.fire('close').isDefaultPrevented()) {
          self.remove();
          addRemove(false, self);
        }

        return self;
      }
438217
def setDefault(self, key, value):
        
        if value is None:
            self._defaults.pop(key, None)
        else:
            self._defaults[key] = value
1120108
function fixDefaultChecked( elem ) {
	if ( rcheckableType.test( elem.type ) ) {
		elem.defaultChecked = elem.checked;
	}
}
804343
function (e) {

    e.returnValue = false;

    if (e.preventDefault) {

      e.preventDefault();
    }

    if (!me.enableEventPropagation_) {

      cancelHandler(e);
    }
  }
503897
function(e) {
            e.preventDefault();
            e.stopImmediatePropagation();
            $(this).trigger($.Event("contextmenu", { data: e.data, pageX: e.pageX, pageY: e.pageY }));
        }