Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<script>
'use strict';
navigator.ml.createContext().then(() => {
window.parent.postMessage({ type: 'availability-result', enabled: true }, '*');
}, error => {
if (error instanceof DOMException && error.name === 'SecurityError') {
window.parent.postMessage({ type: 'availability-result', enabled: false }, '*');
} else {
window.parent.postMessage({ type: 'availability-result', enabled: true }, '*');
}
});
</script>