-
Notifications
You must be signed in to change notification settings - Fork 280
Conversation
|
Hi @Gaffari02, Because you submitted your all 3 homeworks in the same day and we didn't really get time for review them all. |
|
Hello@ JawharBairakdar, |
|
Hello@ JawharBairakdar and @remarcmij , Thanks. |
|
HI @Gaffari02, the solution is probably simpler than you think. You just need to postpone creating the async function main(url) {
const root = document.getElementById('root', { class: "root" });
const div = createAndAppend('div', root, { class: "headbox" });
const heading = createAndAppend('heading', div, { html: "HYF Repositories", class: "heading" });
try {
const repositories = await fetchJSON(url)
const select = createAndAppend('select', div, { class: "select" });
const divContainers = createAndAppend('div', root, { class: "div-containers" });
const leftContainer = createAndAppend('div', divContainers, { class: "container" });
const rightContainer = createAndAppend('div', divContainers, { class: "right-container" });
//...
}
catch (err) {
createAndAppend('div', root, { html: err.message, class: 'alert-error' });
}
} |
|
HI @remarcmij , as you said the solution was simpler than I think. I postponed creating the headbox, heading, select and container divs until after the initial call to fetchJSON(). |
remarcmij
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Gaffari02, thanks for your final update. I'll approve your PR now.
No description provided.