when working with modules Ceylon from JavaScript
the program is running normally but in the console occurs error: Uncaught TypeError: exists is not a function.
file html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type"
content="text/html;charset=UTF-8"/>
<title>Hello</title>
<script type="text/javascript"
src="script/require/1.0.8/require.js">
</script>
<script type="text/javascript">
require.config({
// location of our project's compiled modules
baseUrl: 'modules',
// locations of external dependencies here
paths: {
// path to the Ceylon language module
'ceylon/language':
'./script/ceylon/language'
}
});
//alias our hello module to 'h'
require(['testJavascript/1.0.0/testJavascript-1.0.0'],
function (testJavascript) { h=testJavascript; });
</script>
</head>
<body>
<div>
<input type="submit"
value="Say hello"
onclick="h.run()"/>
</div>
<div>
<span id="greeting"/>
</div>
</body>
</html>
module testJavascript:
module.ceylon:
module testJavascript "1.0.0" {}
package.ceylon:
shared package testJavascript;
run.ceylon:
"Run the module `testJavascript`."
shared void run() {
print("123");
}