From 68e2afa3bd95c46da7df559007d90dedcbae500f Mon Sep 17 00:00:00 2001 From: nelsonic Date: Tue, 7 Aug 2018 13:35:29 +0100 Subject: [PATCH] add render_footer function implementation for #53 --- examples/todo-list/elmish.js | 4 +- examples/todo-list/todo-app.js | 40 ++++++++++- test/elmish.test.js | 6 +- test/todo-app.test.js | 59 ++++++++++++++++- todo-list.md | 118 +++++++++++++++++++++++++++------ 5 files changed, 200 insertions(+), 27 deletions(-) diff --git a/examples/todo-list/elmish.js b/examples/todo-list/elmish.js index 16cf96fe..54e3e054 100644 --- a/examples/todo-list/elmish.js +++ b/examples/todo-list/elmish.js @@ -178,7 +178,9 @@ function span (attrlist, childnodes) { } function strong (text_str) { - return create_element('strong', [], text(text_str)); + var el = document.createElement ("strong"); + el.innerHTML = text_str; + return el; } function text (text) { diff --git a/examples/todo-list/todo-app.js b/examples/todo-list/todo-app.js index 0ff34743..f4bb0d1d 100644 --- a/examples/todo-list/todo-app.js +++ b/examples/todo-list/todo-app.js @@ -90,7 +90,45 @@ function render_main (model) { ) } +/** + * `render_footer` renders the `