Skip to main content

Bug Tracker

Side navigation

#10837 closed bug (duplicate)

Opened November 19, 2011 09:25PM UTC

Closed November 22, 2011 12:29AM UTC

Last modified November 22, 2011 12:29AM UTC

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');
Attachments (0)
Change History (2)

Changed November 22, 2011 12:29AM UTC by dmethvin comment:1

resolution: → duplicate
status: newclosed

Changed November 22, 2011 12:29AM UTC by dmethvin comment:2

Duplicate of #7930.