Skip to main content

Bug Tracker

Side navigation

#7262 closed enhancement (cantfix)

Opened October 20, 2010 09:43PM UTC

Closed April 16, 2011 10:12PM UTC

make isEventSupported public

Reported by: info@corrupt-system.de Owned by: info@corrupt-system.de
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

Attachments (0)
Change History (5)

Changed October 20, 2010 10:43PM UTC by snover comment:1

owner: → info@corrupt-system.de
status: newpending

Could you please provide a use case for this enhancement?

Changed October 21, 2010 03:27PM UTC by info@corrupt-system.de comment:2

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.

Changed October 21, 2010 05:57PM UTC by SlexAxton comment:3

component: unfiledsupport
keywords: → eventSupported event support public
priority: undecidedlow
status: newopen

Changed October 21, 2010 06:39PM UTC by rwaldron comment:4

if anything, a candidate for $.support

Changed April 16, 2011 10:12PM UTC by john comment:5

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.