clear-wallet/eval-sandbox.html

36 lines
1.2 KiB
HTML
Raw Normal View History

2024-01-24 00:41:31 +00:00
<!DOCTYPE html>
2024-06-26 21:18:36 +00:00
<html lang="en" style="width:400px;height:500px">
2024-01-24 00:41:31 +00:00
<head>
2024-06-26 21:18:36 +00:00
<meta charset="utf-8" />
<title>Clear Wallet SandBox</title>
<base href="/" />
<meta name="color-scheme" content="light dark" />
<meta
name="viewport"
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Clear Wallet" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
2024-01-24 00:41:31 +00:00
</head>
<body>
<h1>Eval Sandbox</h1>
<script>
2024-06-26 21:18:36 +00:00
console.info('sandbox loaded');
2024-01-24 00:41:31 +00:00
window.addEventListener('message', function (event) {
const data = event.data;
const execFunc = new Function(
'return ' + data.code
);
const result = execFunc();
event.source.postMessage({ result }, event.origin);
});
</script>
</body>
</html>