Bug Tracker

Opened 6 years ago

Closed 6 years ago

#7262 closed enhancement (cantfix)

make isEventSupported public

Reported by: info@… Owned by: info@…
Priority: low Milestone: 1.6
Component: support Version: 1.4.3
Keywords: eventSupported event support public Cc:
Blocked by: Blocking:


Please make isEventSupported public.

jQuery.eventSupported = function( eventName, el ) {
	el = document.createElement(el || "div");
	eventName = "on" + eventName;
	var isSupported = (eventName in el);
	if ( !isSupported ) {
		el.setAttribute(eventName, "return;");
		isSupported = typeof el[eventName] === "function";
	el = null;

	return isSupported;

Note the slightly change with el variable.

regards alex

Change History (5)

comment:1 Changed 6 years ago by snover

  • Owner set to info@…
  • Status changed from new to pending

Could you please provide a use case for this enhancement?

comment:2 Changed 6 years ago by info@…

  • Status changed from pending to new

This can be usefull for plugin authors, who are implementing new features based on events, wich are supported in some browsers and in some not. Due to the fact, that this method doesn't work in all browsers with all events, it isn't very important.

comment:3 Changed 6 years ago by SlexAxton

  • Component changed from unfiled to support
  • Keywords eventSupported event support public added
  • Priority changed from undecided to low
  • Status changed from new to open

comment:4 Changed 6 years ago by rwaldron

if anything, a candidate for $.support

comment:5 Changed 6 years ago by john

  • Milestone set to 1.6
  • Resolution set to cantfix
  • Status changed from open to closed

(Un)fortunately we've removed most of the isEventSupported logic in jQuery 1.6, so this isn't relevant any longer.

Note: See TracTickets for help on using tickets.