Cape Town |26-ITP-May |Enice Mutanda |Sprint 3| Level 500 feature - #93
Cape Town |26-ITP-May |Enice Mutanda |Sprint 3| Level 500 feature#93Enice-Codes wants to merge 15 commits into
Conversation
Cape Town | 26-ITP-May | Shafiek Walker | Level 200 | TV Show Project
Cape Town | 26-ITP-May | Shafiek Walker | Level 200 | Live Episode Search
Cape Town | 26-ITP-May | Shafiek Walker | Level 200 | Episode Selector
Cape Town | 26-ITP-May | Enice Mutanda | Level 300 | TVMaze API
There was a problem hiding this comment.
- Good use of semantic html
- You have used caching correctly
- The code is generally well organised
- It has all the functionality needed
Overall good work, but I can see some areas for improvement, try and give a go at responding to my comments if you want an extra challenge
I notice you have defined and created HTML elements within the js in a lot of places. It's not incorrect, but what do you think the tradeoffs are of doing it this way versus writing it in the HTML file?
You also mix and match different ways of doing this, sometimes defining all the HTML at once, other times adding elements one by one. Could you make it more consistent?
|
|
||
| backButton.hidden = false; | ||
|
|
||
| controls.innerHTML = ` |
There was a problem hiding this comment.
Is there a reason you wrote all of this in the Js instead of including it in the html file?
| } | ||
|
|
||
| function removeHtml(htmlText) { | ||
| const temporaryElement = document.createElement("div"); |
There was a problem hiding this comment.
Think about why you are doing this. Is it to remove HTML to prevent it from executing when added to the page? One thing to be careful about .innerHTML is this will actually run and execute any HTML passed in even if it's on an element not yet added to the page. There are other techniques that will only parse the HTML instead, can you find one.
Self checklist
Changelist
completed level 0 to 100
completed level 200 on partners repo
completed level 300 ,400 and 500
deployed to netlify
followed instructions for this project