You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
emojinput/index.html

32 lines
1009 B

<!doctype HTML>
<html>
<head>
<title>elmoji</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id="node"></div>
<script src="js/main.js"></script>
<script>
var app = Elm.Main.init({
node: document.getElementById('node')
});
app.ports.copy.subscribe(function(str) {
var el = document.createElement('textarea');
el.value = str;
el.setAttribute('readonly', '');
el.style = {position: 'absolute', left: '-9999px'};
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
window.webkit.messageHandlers.external.postMessage(str);
// window.external.invoke("test_one");
});
</script>
</body>
</html>