-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtest.html
More file actions
33 lines (30 loc) · 822 Bytes
/
test.html
File metadata and controls
33 lines (30 loc) · 822 Bytes
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
<html>
<head>
<script src="./dist/fm-webviewer-bridge.umd.js"></script>
</head>
<body>
ok
<script>
var hello = function(parameter) {
alert("Hello " + parameter.who);
return { message: "hello " + parameter.who };
};
var filterArray = function(parameter) {
var data = parameter.data;
var filterCity = parameter.filterCity;
var result = data.filter(function(element) {
return element.city === filterCity;
});
return result;
};
var exteralAPI = fm.externalAPI({
hello: hello,
filterArray: filterArray
});
//NEW use this method to ensure that props have been located
fm.intialPropsLoaded(function(props) {
exteralAPI.start();
});
</script>
</body>
</html>