Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<script>
'use strict';
window.onmessage = message => {
if (message.data === 'Ready') {
let onSuccess = () => { parent.postMessage('Failure', '*'); };
let onError = error => {
if (error.name == 'SecurityError') {
parent.postMessage('Success', '*');
} else {
parent.postMessage('Failure', '*');
}
};
navigator.keyboard.getLayoutMap().then(onSuccess, onError).catch(onError);
}
};
</script>