jakearchibald / jakearchibald/streaming-html

Is this more flexible?

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
55
Forks
4
PR merge metrics
No merged PRs in 30d

Description

This is my code, but I'm not sure if there will be a problem.
```javascript

const iframe = document.createElement("iframe");
iframe.style.display = "none";
document.body.appendChild(iframe);
iframe.onload = () => {
iframe.onload = null;
var xhr = new XMLHttpRequest();
var pos = 0;
xhr.onprogress = function() {
iframe.contentDocument.write(xhr.response.slice(pos));
pos = xhr.response.length;
while (iframe.contentDocument.body.childNodes.length > 0) {
content.appendChild(iframe.contentDocument.body.childNodes[0]);
}
};

xhr.onload = function() {
iframe.contentDocument.close();
document.body.removeChild(iframe);
};

xhr.responseType = "text";
xhr.open("GET", "comments.inc.txt");
xhr.send();
};

iframe.src = "";

```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue only provides an inline JavaScript approach using a hidden iframe, XMLHttpRequest, and comments.inc.txt; no repository file or test is named. Start by locating the related implementation and clarifying what behavior should be more flexible, then define the expected result and a test or reproducible example before making changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.