Closed Bug 675402 Opened 13 years ago Closed 11 years ago

Scripts attached to pages used as the contentURL property for widgets don't get executed

Categories

(Add-on SDK Graveyard :: General, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: KWierso, Unassigned)

References

()

Details

Someone on the AMO forums is saying that scripts that are directly part of a page that's being used as a contentURL for a widget aren't being executed.

From the widget documentation, it sounds like content JS should be loaded and run before anything else happens:
https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/packages/addon-kit/docs/widget.html

>  "end": load content scripts once all the 
>  content (DOM, JS, CSS, images) for the 
>  widget has been loaded, at the time the 
>  window.onload event fires
>  
>  This property is optional and defaults to "end".
Wes: have you been able to reproduce the problem, and do you happen to have any sample code or steps to reproduce?
Priority: -- → P1
Whiteboard: [triage:followup]
Target Milestone: --- → 1.1
(In reply to comment #1)
> Wes: have you been able to reproduce the problem, and do you happen to have
> any sample code or steps to reproduce?

I just tried to test it with this addon I wrote, but both the onclick and onload handler are working for me... https://builder.addons.mozilla.org/addon/1012572/latest/

Maybe the actual contentURL needs to be hosted remotely? That add-on uses an html file included in the add-on...

I'll ask on the forum to see what specifically the user is doing.
Priority: P1 → --
Target Milestone: 1.1 → ---
Whiteboard: [triage:followup]
Wes: any update on whether or not you've been able to confirm this?
Status: NEW → UNCONFIRMED
Ever confirmed: false
Whiteboard: [triage:followup]
Okay, I have no idea what's going on. 

In my main profile (running in the current Nightly), my test addon mentioned in comment 2 works just fine.

Using a new profile, I started up Firefox 6 and tried my addon. It didn't work, just like the forum poster says.

I switched to Firefox 7 and tried my addon. Still not working.

Same for Firefox 8.

And when I used the new profile in a Nightly build, it also does NOT work.

So something in my main profile has been changed from non-default settings to make it work, I guess.
Status: UNCONFIRMED → NEW
Ever confirmed: true
But now in my standalone 64-bit profile, it works on the 64-bit Nightly...
I am so confused.
Irakli, any ideas here?
Priority: -- → P1
Whiteboard: [triage:followup]
When Australis lands widget will be deprecated so we won't be working on this.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.