Closed Bug 988249 Opened 11 years ago Closed 11 years ago

Event listener is not called when javascript.enabled is false

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: slash, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0 Iceweasel/28.0 (Beta/Release) Build ID: 20140319130652 Steps to reproduce: 1. Run this code: const { PageMod } = require("sdk/page-mod"); PageMod({ include: /.*/, contentScript: 'document.addEventListener("click", function(event) { console.log("click"); })' }); 2. Open about:config and set javascript.enabled to false 3. Open any page (not about:*) 4. Click a mouse button Actual results: The event listener is not called. Expected results: The event listener is called.
This is working as expected, as the contentScript is running in the content's scope, where javascript is disabled.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
This is a regression. The code works with firefox 27.
Irakli, care to look into this?
Flags: needinfo?(rFobic)
Attached patch patchSplinter Review
Bug 986886 is very similar to this bug. The fix for greasemonkey could be applied to add-on sdk.
Flags: needinfo?(rFobic)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: