If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

xpcdom -- can't do 'window.onload = functionRef;', throws error

VERIFIED FIXED

Status

()

Core
DOM: Core & HTML
--
major
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: John Morrison, Assigned: Mitchell Stoltz (not reading bugmail))

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
Assigning a function reference to the window.onload property results
in this error when using the post XPCDOM builds [2001050812 win2k].

JavaScript error:
 line 0: uncaught exception: [Exception... ""  nsresult: "0x805303f3 
(<unknown>)"  location: "JS frame :: file:///c|/temp/bar.html :: <TOP_LEVEL> :: 
line 7"  data: no]


----
Example usage:

<html>
<head>
  <script>
    function onDocumentLoad() { alert('hi there\n'); }
    window.onload = onDocumentLoad;
  </script>
</head>
<body>
  <p>the body</p>
</body>
</html>
----

However, setting the html onload handler with "<body onload='foo()'"
is still OK.

This (among other things) breaks the page loading timing test. 
I guess I will go put a workaround in place (manually insert the 
onload attribute into the test files.
(Reporter)

Comment 1

17 years ago
Also applies to '.onerror', '.onresize', '.onblur', '.onunload', and '.onfocus'
event handlers for |window|.
(Reporter)

Comment 2

17 years ago
Okay, so I have my workaround in place for this, which should be a no-op
in the way the test runs. So, hyatt, I think you can run this with your 
build now.
mstoltz knows how to fix this, reassigning.
Assignee: jst → mstoltz
(Assignee)

Comment 4

17 years ago
Fix checked in.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Can we at least have a patch after the fact, to review?

/be

Comment 6

17 years ago
Verified with 2001-05-22-04.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.