slimerjs-firefox
Version:
This repo includes slimerjs as well as downloads a local copy of Firefox.
44 lines (38 loc) • 1.01 kB
HTML
<html>
<head>
<meta charset="utf-8">
<title>hello world</title>
</head>
<body>Hello!
<script type="text/javascript">
var foo = ""
function doAlert() {
foo = "before"
window.alert("alert message");
foo ="alert done";
}
function doConfirm(msg) {
if (!msg)
msg = "do you confirm?";
if (window.confirm(msg)) {
return "ok";
}
return "cancel";
}
function doPrompt(msg, defaultValue) {
if (!msg)
msg = "what is your name?";
var response;
if (defaultValue)
response = window.prompt(msg, defaultValue);
else
response = window.prompt(msg);
if (response === null) {
return "--cancel--";
}
return response;
}
</script>
</body>
</html>