Modify ↓
Ticket #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: | |
| Blocking: | Blocked by: |
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
comment:2 Changed 3 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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Could you please provide a use case for this enhancement?