-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (39 loc) · 1.99 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title> simple test cast </title>
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<link rel="stylesheet" href="https://dev.mavo.io/dist/mavo.css" />
<script src="https://dev.mavo.io/dist/mavo.es5.js"></script>
</head>
<body style="padding: 2em;">
<h1 style="text-align: center;">Simple Test Case of Mavo - Expressions.register() and Expressions.unregister() </h1>
<div style="padding: 2em 0em;">
This simple case tests bugs in Expressions.register() and Expressions.unregister() when an expression involves multiple Mavo applications. Refer to <a href="https://github.com/mavoweb/mavo/issues/434">Issue #434 </a> and <a href="https://github.com/mavoweb/mavo/issues/436"> issue #436</a> for details.
</div>
<div mv-app="app1">
<div>Application name: <span property="appname">Mavo</span></div>
</div>
<div mv-app="app2">
<div>What do you think about [app1.appname]</div>
<div property="rating">awesome</div>
</div>
<div mv-app="app3">
<h2>Discovery:</h2>
<div id="multi-app-expression"> [app1.appname] is [if(app1.rating, app1.rating, app2.rating)] ! </div>
<div style="padding: 2em 0em;"> Developers, check the dev console for errors. Click the button below to watch errors during unregistering domexpression object.</div>
<div style="text-align: center; padding: 10vh;"> <button id="unregister" type="button" style="padding: 10px;">Click me to unregister domexpression</button></div>
</div>
<script>
document.querySelector('#unregister').addEventListener('click', function(e){
Mavo.all.app3.expressions.unregister(Mavo.DOMExpression.elements.get(
document.querySelector('#multi-app-expression')
)[0]);
})
</script>
</body>
</html>