Open Bug 1491994 Opened 6 years ago Updated 2 years ago

Content scripts sometimes run twice for about:blank

Categories

(WebExtensions :: General, defect, P3)

61 Branch
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: bugzilla, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0 Build ID: 20180905135451 Steps to reproduce: 1. Install the attached webExtension 2. change the setting so that a new tab opens a blank page 3. open a new tab 4. open the browser console Actual results: The follwing error is shown: SyntaxError: redeclaration of const test Expected results: No error
Summary: Content scripts cannot use const variables in about:blank → Content scripts sometimes run twice for about:blank
Since the console.log() is only shown once I do not think the script is run twice.
(In reply to kkapsner from comment #1) > Since the console.log() is only shown once I do not think the script is run > twice. That's because the duplicate const declaration prevents the second attempt from actually executing.
Ah... that makes sense. Thanks for the explanation.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: