| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <!-- | 3 <!-- |
| 4 Copyright (c) 2012 The Chromium Authors. All rights reserved. | 4 Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 5 Use of this source code is governed by a BSD-style license that can be | 5 Use of this source code is governed by a BSD-style license that can be |
| 6 found in the LICENSE file. | 6 found in the LICENSE file. |
| 7 --> | 7 --> |
| 8 <head> | 8 <head> |
| 9 <meta http-equiv="Pragma" content="no-cache"> | 9 <meta http-equiv="Pragma" content="no-cache"> |
| 10 <meta http-equiv="Expires" content="-1"> | 10 <meta http-equiv="Expires" content="-1"> |
| 11 <title>{{title}}</title> | 11 <title>{{title}}</title> |
| 12 <script type="text/javascript" src="common.js"></script> | 12 <script type="text/javascript" src="common.js"></script> |
| 13 <script type="text/javascript" src="example.js"></script> | 13 <script type="text/javascript" src="example.js"></script> |
| 14 </head> | 14 </head> |
| 15 <body {{attrs}}> | 15 <body {{attrs}}> |
| 16 <h1>{{title}}</h1> | 16 <h1>{{title}}</h1> |
| 17 <h2>Status: <code id="statusField">NO-STATUS</code></h2> | 17 <h2>Status: <code id="statusField">NO-STATUS</code></h2> |
| 18 <!-- The NaCl plugin will be embedded inside the element with id "listener". | 18 <p>The Hello World Stdio example is the simplest one in the SDK. It uses the |
| 19 See common.js.--> | 19 ppapi_main library which creates an Module and Instance, using default |
| 20 | 20 values to simplify setup and communication with the PPAPI system. In |
| 21 <p>This example demonstrates using nacl_io ppapi_main to simplify the | 21 addition, it uses the nacl_io library to remap IO to the Pepper API. This |
| 22 creation of a PPAPI application. The ppapi_main library handles the creation | 22 simplifies IO by providing a standard blocking API and allowing STDERR to |
| 23 and initialization of a pp::Instance object. The nacl_io library | 23 go to the JavaScript console by default.</p> |
| 24 intercepts standard file IO, allowing the remapping of STDOUT, and | |
| 25 STDERR.</p> | |
| 26 <p>In main, we write to both STDOUT and STDERR, printing a hello world | 24 <p>In main, we write to both STDOUT and STDERR, printing a hello world |
| 27 message.</p> | 25 message.</p> |
| 28 | 26 |
| 29 <!-- The NaCl plugin will be embedded inside the element with id "listener". | 27 <!-- The NaCl plugin will be embedded inside the element with id "listener". |
| 30 See common.js.--> | 28 See common.js.--> |
| 29 <h2>Output:</h2> |
| 30 <pre id="log" style="font-weight:bold"></pre> |
| 31 <div id="listener"></div> | 31 <div id="listener"></div> |
| 32 <h1>OUTPUT</h1> | |
| 33 <pre> | |
| 34 <p><b id='outputString'></b></p> | |
| 35 </pre> | |
| 36 </body> | 32 </body> |
| 37 </html> | 33 </html> |
| OLD | NEW |