JavaScript Error From FireFox xbl-marquee.xml

NEW
Unassigned

Status

()

Core
DOM
7 years ago
7 years ago

People

(Reporter: Trent, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

When setting the contents of a cell innerHTML to a <Marquee> with JavaScript I get a JavaScript error from the xbl-marquee.xml page.

This is one of the many weird JavaScript issues that is happeneing since upgrading to 4.0.

Reproducible: Always

Steps to Reproduce:
Create a mouse over the sets the inner contects of an element to something in a Marquee, then change it frequently.

Actual Results:  
Got the error in my console.

Expected Results:  
Not thrown an Error.
Can you please attach a testcase showing the problem or provide a URL to one?
(Reporter)

Comment 2

7 years ago
<!DOCTYPE html>
<html>
    <head></head>
    <body>
        
        <button onmouseover="document.getElementById('TheDiv').innerHTML = 'Hey There';">Button 1</button>
        <button onmouseover="document.getElementById('TheDiv').innerHTML = '<marquee>Hey There</marquee>';">Button 2</button>
        <div id="TheDiv" style="border:red solid 1px; width:100px;"></div>
    </body>
</html>

This is the HTML, you can stop the error by using document.getElementsByTagName('marquee')[0].stop();
Confirming. This doesn't look like a parser problem, though. Not sure where this belongs. Guessing DOM.
Status: UNCONFIRMED → NEW
Component: HTML: Parser → DOM
Ever confirmed: true
OS: Windows 7 → All
QA Contact: parser → general
Hardware: x86 → All
So is the error you're seeing this one:

Error: myThis._doMove is not a function
Source File: chrome://xbl-marquee/content/xbl-marquee.xml
Line: 509

?
(In reply to comment #4)
> So is the error you're seeing this one:
> 
> Error: myThis._doMove is not a function
> Source File: chrome://xbl-marquee/content/xbl-marquee.xml
> Line: 509
> 
> ?

That's the error I saw.
So the problem is that we actually unhook the XBL proto chain now when removing from the document, but the timer remains live.  And we do NOT call the XBL dtor in that situation, so that can't be used to cancel the timer.

Martijn, can we just change xbl-marquee to handle _doMove not being there?
I guess you could do that.
Or perhaps the timers should be removed when _doMove does not exist?

I guess some testing with IE has to be done to see how they handle this kind of dynamice adding and removing of marguees.
> Or perhaps the timers should be removed when _doMove does not exist?

That's what I meant: when no _doMove, just clearInterval and bail out.
You need to log in before you can comment on or make changes to this bug.