diff options
author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-18 17:08:08 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-18 17:08:08 +0000 |
commit | dfc0de0520c10c523d1b08e8de9ebfccfad783c2 (patch) | |
tree | 456897caa5a54e41faf8d63f6f168a39650747a5 /Website | |
parent | f7dc011453eab0c82e909def0621d06562aabaa8 (diff) | |
download | newsaggregator-dfc0de0520c10c523d1b08e8de9ebfccfad783c2.tar.gz newsaggregator-dfc0de0520c10c523d1b08e8de9ebfccfad783c2.tar.bz2 newsaggregator-dfc0de0520c10c523d1b08e8de9ebfccfad783c2.zip |
Attributes section coded
Diffstat (limited to 'Website')
-rw-r--r-- | Website/scripts/main.ts | 6 |
1 files changed, 6 insertions, 0 deletions
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); } } |