MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / createMovieContainer

Function createMovieContainer

assets/js/TrailerApp.js:32–48  ·  view source on GitHub ↗
(movies, title = 'Search Results')

Source from the content-addressed store, hash-verified

30}
31
32function createMovieContainer(movies, title = 'Search Results') {
33 const movieElement = document.createElement('div');
34 movieElement.setAttribute('class', 'movie');
35 const header = document.createElement('h2');
36 header.innerHTML = title;
37 const content = document.createElement('div');
38 content.classList = 'content';
39 const contentClose = `<p id="content-close"><i class="fas fa-times-circle"></i></p>`;
40 content.innerHTML = contentClose;
41
42 const section = movieSection(movies);
43
44 movieElement.appendChild(header);
45 movieElement.appendChild(section);
46 movieElement.appendChild(content);
47 return movieElement;
48}
49
50function createErrorContainer() {
51 const errorCont = document.createElement('div');

Callers 2

renderSearchDataFunction · 0.85
renderMoviesFunction · 0.85

Calls 1

movieSectionFunction · 0.85

Tested by

no test coverage detected