Methods
_checkBookMarked(data, bmData)
Checks if the movie/tv show is bookmarked and if bookmarked then the card would be generated with a bookmark icon.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | Contains the title,image and id of the movie/tv show. |
bmData |
Array | Contains all the user bookmarks data. |
- Source:
Returns:
The bookmark icon element.
_clearHTML()
Clears the innerHTML of the parent element.
- Source:
_generateHTML()
Generates movie/tv show cards and render it in the page once done.
- Source:
_scrollToTop()
Scrolls the view to the very top of the page.
- Source:
_updateTitle()
Updates the page title.
- Source:
renderErrorMsg(errorMsg)
Generates error HTML and renders it in the page.
Parameters:
Name | Type | Description |
---|---|---|
errorMsg |
String | Error message to be rendered in the page. |
- Source:
renderHTML(movieData, bmData)
Renders the generated movie/tv show cards in the page.
Parameters:
Name | Type | Description |
---|---|---|
movieData |
Array | Array of objects that contains the id,image and title of the movie/tv show. |
bmData |
Array | Array that contains all the user bookmarked movies/tv shows data. |
- Source:
renderLoading()
Renders loading spinner in the page.
- Source: