flycast/shell/nacl/example.js

20 lines
547 B
JavaScript
Raw Normal View History

// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function $(id) {
return document.getElementById(id);
}
// Add event listeners after the NaCl module has loaded. These listeners will
// forward messages to the NaCl module via postMessage()
function attachListeners() {
}
// Handle a message coming from the NaCl module.
function handleMessage(event) {
2015-07-28 21:49:52 +00:00
console.log(event.data);
$("status").textContent = event.data;
}