Closed Bug 229595 Opened 16 years ago Closed 9 years ago

microsoft.com - window onload method overloard fails with parse error (test case included)

Categories

(Tech Evangelism Graveyard :: English US, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: 13640887, Unassigned)

References

()

Details

(Keywords: top100, top500)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7

I'm not quite sure what is wrong here. My first guess is that support for
overloaded functions is broken?

Parsing of attached HTML/JavaScript fails with the following error:

Error: missing ( before formal parameters
Source File: psdk-full.htm
Line: 4, Column: 15
Source Code: function window::onload()

This works with IE 6.0 SP1.

Reproducible: Always

Steps to Reproduce:
1. Load HTML file or URL.
2. Overloaded window onload function should do something.


Actual Results:  
Prints nothing.

Expected Results:  
Print Hello, World.

Simple test case will be attached.
Attached file Test case.
invalid, mozilla doesn´t support document.all, document.all is IE-proprietary code.
Besides, the Javascript Console gives an error:

Error: missing ( before formal parameters
Source File: http://bugzilla.mozilla.org/attachment.cgi?id=138082&action=view
Line: 4, Column: 15
Source Code:
function window::onload(null)


<script language="javascript">
function window::onload(null)
{
	document.all.links.innerHTML = "<b>Hello, World</b>"
}
</script>
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Actually, the problem is that "window::onload" is not JS.  What you want is:

window.onload = function () { ... }

Comment 2 really doesn't have much to do with this bug...

But yes, the bug is invalid.
Does Mozilla have some kind of "quirks" mode that would allow for this syntax to
be supported? The fact of the matter is that I can't use part of Microsoft's
website with the Mozilla browser. Maybe for some this isn't a major tragedy, but
if you're looking to replace Internet Explorer, you should probably be able to
support this kind of stuff?
The JS engine has no quirks mode I am aware of.  And we are not looking to
replace IE, exactly.  We're looking to write a web browser.

Since this is a problem with a real site, reopening and sending to evangelism
(not that that will work on a Microsoft site....)
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Assignee: general → english-us
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → English US
Ever confirmed: true
OS: Windows 2000 → All
Product: Browser → Tech Evangelism
QA Contact: PhilSchwartau → english-us
Hardware: PC → All
Version: Trunk → unspecified
That's obnoxious, wrapping something written in a language beyond ECMA-262
Edition 3 (possibly early draft Edition 4 support) in <script
language="javascript"> (not even HTML 4 compliant <script type=...>).

This should be an evang bug, even if Mozilla were to support ECMA-262 Ed. 4 and
if that final standard were to support what is written in psdk-full.htm, because
of the bogus script language attribute.

/be
Summary: window onload method overloard fails with parse error (test case included) → microsoft.com - window onload method overloard fails with parse error (test case included)
Keywords: top500
Keywords: top100
INCOMPLETE due to lack of activity since the end of 2009.

If someone is willing to investigate the issues raised in this bug to determine whether they still exist, *and* work with the site in question to fix any existing issues, please feel free to re-open and assign to yourself.

Sorry for the bugspam; filter on "NO MORE PRE-2010 TE BUGS" to remove.
Status: NEW → RESOLVED
Closed: 16 years ago9 years ago
Resolution: --- → INCOMPLETE
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.