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.

+
+
+ + + +