From f5196268c43b024bc15296a490429ac0b968f305 Mon Sep 17 00:00:00 2001 From: Nate Taylor Date: Wed, 23 Oct 2019 20:16:04 -0500 Subject: [PATCH] Adding chain catch function --- consuming.html | 4 +++- src/consuming.mjs | 4 ++++ src/results.mjs | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/consuming.html b/consuming.html index f66114a..23f9975 100644 --- a/consuming.html +++ b/consuming.html @@ -16,17 +16,19 @@ +

Results

diff --git a/src/consuming.mjs b/src/consuming.mjs index 2e24c07..8439e18 100644 --- a/src/consuming.mjs +++ b/src/consuming.mjs @@ -12,6 +12,10 @@ export function chain(){ setText('C'); } +export function chainCatch(){ + setText('C1') +} + export function final(){ setText('D'); } \ No newline at end of file diff --git a/src/results.mjs b/src/results.mjs index e0f9a9c..32fbafe 100644 --- a/src/results.mjs +++ b/src/results.mjs @@ -1,4 +1,9 @@ export default function setText(text){ const results = document.getElementsByClassName("results")[0].children[0]; results.innerHTML = text; +} + +export function appendText(text){ + const results = document.getElementsByClassName("results")[0].children[0]; + results.innerHTML += text; } \ No newline at end of file