Bug Tracker

Opened 7 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:

Description

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 7 years ago by snover

Owner: set to info@…
Status: newpending

Could you please provide a use case for this enhancement?

comment:2 Changed 7 years ago by info@…

Status: pendingnew

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 7 years ago by SlexAxton

Component: unfiledsupport
Keywords: eventSupported event support public added
Priority: undecidedlow
Status: newopen

comment:4 Changed 7 years ago by Rick Waldron

if anything, a candidate for $.support

comment:5 Changed 6 years ago by john

Milestone: 1.6
Resolution: cantfix
Status: openclosed

(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.