Closed
Bug 296260
Opened 20 years ago
Closed 19 years ago
Javascript include function call throws error when page is loading
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 252542
People
(Reporter: mattsch, Unassigned)
References
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 When attempting to call a function from a javascript include file which was listed before the function was called, an error is thrown in the console. I've tested this with the onmouseover event handler but I'm sure it's possible with others. It seems like the function is being called before the javascript file is being included and as I understand it, nothing should be rendered on the page before the javascript file is included. Reproducible: Sometimes Steps to Reproduce: 1. Create a mouseover function in an include file 2. Include the file using a javascript include in an html page 3. Create an element with an onmouseover event handler in the html page 4. Mouse over the element while the page is still loading Actual Results: Throws an error in the javascript console even though the function is defined before its called. Expected Results: Don't throw an error in the javascript console. The javascript file I am using to include is sending php server-side headers to the browser to tell it not to cache.
| Reporter | ||
Comment 1•20 years ago
|
||
I took out the no-cache headers for the javascript include file and it still throws errors, just not as often. Still I am curious why the page is being rendered before the javascript include functions are defined?
| Reporter | ||
Updated•20 years ago
|
Severity: normal → major
Comment 2•19 years ago
|
||
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
| Reporter | ||
Comment 3•19 years ago
|
||
Auto resolve because no one has responded to this bug? Lame. Statistically speaking, there aren't enough people to comb over the number of bug reports in three months. Can't spell focusing properly either? This is still a bug despite no one else commenting on it. I just tested in build 20050908 (Firefox 1.5 Beta) and 20050910 (Seamonkey 1.0a).
Component: General → JavaScript Engine
Product: Firefox → Core
Version: unspecified → 1.8 Branch
Comment 4•19 years ago
|
||
Well it would help if you could attach a testcase.
| Reporter | ||
Comment 5•19 years ago
|
||
Remote javascript file to be used with test case file.
| Reporter | ||
Comment 6•19 years ago
|
||
This testcase demonstrates how mousing over/out input buttons which use the onmouseover/onmouseout event handlers while the page is loading will cause javascript errors.
| Reporter | ||
Comment 7•19 years ago
|
||
Attachment 198480 [details] apparently is more effective at demonstrating the bug on
bugzilla than my local computer possibly due to the fact that the connection to
the server is slower than loading the file locally.
Comment 8•19 years ago
|
||
I don't think this is JS engine, but it more probably parser. Blake, I can't reproduce this with a Firefox 1.0.x build nor in IE, but can in Firefox 1.5. Did we change external scripts to not block the parser?
Comment 9•19 years ago
|
||
No, we are correctly blocking the parser for this testcase. I wonder if the errors are coming from mousing over the previous page's event handlers after we've JS_ClearScope()d the old document and are in paint suppression for the new one. I can't seem to reproduce this on the first page load, only on reload (i.e., when I've already loaded the page once, and it's currently on my screen). Is this the case for other people? If so, this might be related to bug 307777.
Comment 10•19 years ago
|
||
(In reply to comment #9) Good catch. First load... no errors mousing over. Reload... errors mousing over. And I was wrong in my earlier comment. 1.0.x has the same behavior. IE appears to deactivate the mouseovers on reload. Over to DOM
Assignee: nobody → general
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM
Ever confirmed: true
QA Contact: general → ian
Updated•19 years ago
|
Attachment #198479 -
Attachment mime type: application/octet-stream → text/javascript
Comment 11•19 years ago
|
||
*** This bug has been marked as a duplicate of 252542 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•