mutation events don't work in xml/html

VERIFIED FIXED in mozilla0.9.1

Status

()

VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: alex, Assigned: hyatt)

Tracking

({xhtml})

Trunk
mozilla0.9.1
x86
Windows 2000
xhtml
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
Testcase below produces assertion in nsXMLElement::HandleDOMEvent() because its 
being passed a null PresContext.
A similar XUL testcase works fine.

-------------------------------------------------------------
<?xml version="1.0" ?>
<doc xmlns:html="http://www.w3.org/1999/xhtml" >
<html:script language="javascript">
function handler(e){ 
    alert(e); 
}
function attachHandler(){ 
    document.documentElement.addEventListener("DOMAttrModified",handler,false);
}
var gCount=0;
function modifyAttrib(){
    document.documentElement.setAttribute("foo",++gCount);
}
</html:script>
<html:button onclick="attachHandler();">add mutation listener</html:button>
<html:button onclick="modifyAttrib();">modify an attrib</html:button>
</doc>
------------------------------------------------------------------------
Keywords: xhtml
(Assignee)

Comment 1

18 years ago
Probably my fault.
Assignee: joki → hyatt
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
(Assignee)

Comment 2

18 years ago
Fixed.  I removed the bogus NS_ENSURE_ARG for the pres context at the front of 
nsXMLElement's HandleDOMEvent.  The pres context is null for mutation events, 
so this check is bogus.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 3

18 years ago
verifying build 2001-04-10-04-trunk
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.