HTML5 Web APIs

Exercise: Web Components

The newsreader web application displays the news headlines of a selected country
(requires an API key from GNews).

  • Implement a web component NewsArticle whose constructor takes an article (with title, image, content and URL) as parameter and displays it using a shadow DOM.
  • Use the component to render the news articles received from the GNews server.