| Index: native_client_sdk/src/examples/tutorial/testing/example.js
|
| diff --git a/native_client_sdk/src/examples/tutorial/testing/example.js b/native_client_sdk/src/examples/tutorial/testing/example.js
|
| index 627c5ca4fa4f457bdf6c33cee27ce98eaa9c66e3..b51b98856385c8efb53109dbdc3cd8b2b5704926 100644
|
| --- a/native_client_sdk/src/examples/tutorial/testing/example.js
|
| +++ b/native_client_sdk/src/examples/tutorial/testing/example.js
|
| @@ -45,9 +45,14 @@ function handleMessage(event) {
|
| var msg = event.data;
|
| var firstColon = msg.indexOf(':');
|
| var cmd = msg.substr(0, firstColon);
|
| +
|
| + if (cmd == 'testend') {
|
| + event.srcElement.postMessage({'testend' : ''});
|
| + return;
|
| + }
|
| +
|
| var cmdFunctionName = cmd + 'Command';
|
| var cmdFunction = window[cmdFunctionName];
|
| -
|
| if (typeof(cmdFunction) !== 'function') {
|
| console.log('Unknown command: ' + cmd);
|
| console.log(' message: ' + msg);
|
|
|