#1109 new
Markus Koller

Element.descendantOf() should check if ancestor is an element

Reported by Markus Koller | August 5th, 2010 @ 11:44 PM

In Gecko, some DOM methods throw inappropriate exceptions when passed invalid values (also see https://bugzilla.mozilla.org/show_bug.cgi?id=362571). One of these is compareDocumentPosition(), which is used in Element.descendantOf(). This method should first check if the passed ancestor is actually an element before calling compareDocumentPosition().

Steps to reproduce: call "document.body.descendantOf(null)" inside a DOM (it won't throw an error when called from Firebug).

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Tags

Pages