Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10837 closed bug (duplicate)

Triggering custom events with the same name as a property fails

Reported by: rv4wd Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7
Keywords: Cc:
Blocked by: Blocking:

Description

When triggering a custom event on an object which has a property with the same name, you get an error: TypeError: Property 'custom' of object #<Document> is not a function

document.custom = 1;
$(document).trigger('custom');

This makes it impossible to use custom events with property names on non-DOM-objects when there is a property with the same name:

var obj = {name: 'John Doe'};
$(obj).trigger('name');

Change History (2)

comment:1 Changed 6 years ago by dmethvin

Resolution: duplicate
Status: newclosed

comment:2 Changed 6 years ago by dmethvin

Duplicate of #7930.

Note: See TracTickets for help on using tickets.