New issue
Advanced search Search tips

Issue 659174 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Extensions - Content Script - document_start injection - modifying DOM at document_start results in duplicate head and body elements.

Reported by messagec...@gmail.com, Oct 25 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2899.0 Safari/537.36

Steps to reproduce the problem:
1. Install developer extension in reduced test case. 
2. Load a page, such as https://dosaygo.com or https://abc.xyz/
3. Observe the following ( summarized ) incorrect document tree:

html
- head
- body
- head
- body

4. Comment out the manifest.content_scripts[ 0 ].run_at directive in manifest.json so the content script is run at default of document_idle, instead of document_start, and Observe the normal expected document tree.

What is the expected behavior?
Document tree does not contain duplicate head and body elements if content script operates at document start.

Normal behavior observed when content script is run at default of document idle.

What went wrong?
Duplicate head and body elements ( actually they are not exact duplicates, but there are 2 head and 2 body elements ) when content script is run at document_start.

Maybe the HTML import load, template injection, and content script run, and actual owner document DOM content load, all interleave and so the documentElement is incorrectly given two head and body elements.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 56.0.2899.0  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0
 
e (16).zip
1.7 KB Download

Comment 1 by tkent@chromium.org, Oct 28 2016

Components: -Blink>HTML Platform>Extensions
Project Member

Comment 2 by sheriffbot@chromium.org, Oct 30 2017

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment