From dfc0de0520c10c523d1b08e8de9ebfccfad783c2 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 18 Feb 2019 17:08:08 +0000 Subject: Attributes section coded --- Website/scripts/main.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Website') diff --git a/Website/scripts/main.ts b/Website/scripts/main.ts index f835604..d9c84a4 100644 --- a/Website/scripts/main.ts +++ b/Website/scripts/main.ts @@ -11,6 +11,12 @@ class Article { this.Title = document.createElement('h1'); this.Image = new Image(); let link = document.createElement('a'); + + // attributes + link.innerText = title; + link.setAttribute('href', article_link); + this.Image.setAttribute('src', image_link); + this.Image.setAttribute('title', description); } } -- cgit v1.2.3-13-gbd6f