From 9836da4af17e8109aba464c127ced782a18eadf6 Mon Sep 17 00:00:00 2001 From: "Paul D. Fernhout" Date: Sat, 27 Jun 2015 11:43:28 -0400 Subject: [PATCH] Add unloadingTest.html This is a test of unloading components when another component is mounted on a different root. The test currently fails. See Issue #694 for details. --- tests/unloadingTest.html | 101 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 tests/unloadingTest.html diff --git a/tests/unloadingTest.html b/tests/unloadingTest.html new file mode 100644 index 00000000..c3aaf446 --- /dev/null +++ b/tests/unloadingTest.html @@ -0,0 +1,101 @@ + + + + + + Mithril unloading test + + + + + +

This tests unloading of components which have an unloader method.

+

+ The test mounts Component1 on div "one" with a nested internal component and an "open" button. + The internal component displays its creation time and an input field. + The open button when clicked will in turn mount Component2 on div "two" with a close button. + The close button will unmount the second component. +

+

When the second component is mounted or unmounted, the expected behavior is:

+ +

Check the console for logging as to redraws and unload events.

+
+
+ + + +