Open Bug 1627844 Opened 4 years ago Updated 3 years ago

invalid value for HTMLIFrameElement instance's contentWindow.document.readyState "uninitialized"

Categories

(Core :: DOM: Core & HTML, defect, P3)

74 Branch
defect

Tracking

()

People

(Reporter: divinity76, Unassigned)

Details

(Keywords: parity-chrome, parity-safari)

Attachments

(1 file)

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

Steps to reproduce:

unfortunately i don't have a live url to reproduce it, also i am running version the outdated version "Firefox 74.0" from Ubuntu 18.04 repo (i know Ubuntu/Canonical does something to the code, but don't think it's related to the bug) but basically (but not exactly) i ran the html:

<iframe id="buggy" src="page_that_loads_content_type_text_html_charset_utf8"></iframe>
<script>
console.log(document.querySelector("#buggy").contentWindow.document.readyState);
</script>

(the exact html i used when i noticed the bug is available here: https://pastebin.com/LHffBgBv )

Actual results:

i got this in my console log:

uninitialized

Expected results:

one of the documented possible values for readyState should have been logged ("loading" or "interactive" or "complete") - for comparison Chromium logged "complete".

.. sorry, i meant <iframe id="buggy" src="page_that_loads_content_type_text_plain_charset_utf8"></iframe>

  • the iframe window loaded content with the HTTP header "Content-Type: text/plain; charset=UTF-8"

idk if that is related, but i thought it might be.

.. and the documentation i'm referring to is https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState

the value "uninitialized" is not documented there.

can also reproduce on (the fully up-to-date) 68.6.1esr (64-bit)

Ok, can also reproduce it on the current stable release: 74.0.1 (64-bit)

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Priority: -- → P3

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3
Attached file bug1627844.html

The iframe is somehow indeed "uninitialized" initially and any modification there immediately disappears when it becomes "complete".

Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: