Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: native_client_sdk/src/doc/devguide/tutorial/tutorial-part2.rst

Issue 531183002: Add data-path restriction to tutorial, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 .. _tutorial2: 1 .. _tutorial2:
2 2
3 ###################################### 3 ######################################
4 C++ Tutorial: Getting Started (Part 2) 4 C++ Tutorial: Getting Started (Part 2)
5 ###################################### 5 ######################################
6 6
7 .. contents:: 7 .. contents::
8 :local: 8 :local:
9 :backlinks: none 9 :backlinks: none
10 :depth: 2 10 :depth: 2
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 <body data-name="part2" 294 <body data-name="part2"
295 data-tools="newlib glibc pnacl" 295 data-tools="newlib glibc pnacl"
296 data-configs="Debug Release" 296 data-configs="Debug Release"
297 data-path="{tc}/{config}"> 297 data-path="{tc}/{config}">
298 ... 298 ...
299 299
300 ``common.js`` will read these data attributes to allow you to load the same 300 ``common.js`` will read these data attributes to allow you to load the same
301 example with different toolchains by changing the URL's `query string 301 example with different toolchains by changing the URL's `query string
302 <http://en.wikipedia.org/wiki/Query_string>`_. For example, you can load the 302 <http://en.wikipedia.org/wiki/Query_string>`_. For example, you can load the
303 glibc Debug version of this example by navigating to 303 glibc Debug version of this example by navigating to
304 ``index.html?tc=glibc&config=Debug``. 304 ``index.html?tc=glibc&config=Debug``. Path URI's such as ``../``, for example
305 do not work for either the data-path parameter or its corresponding query
306 string.
JF 2014/09/02 20:57:34 I think this is helpful, but IIUC the confusion fr
305 307
306 Next, we remove the ``embed`` element that is described in HTML. This will be 308 Next, we remove the ``embed`` element that is described in HTML. This will be
307 automatically added for us by ``common.js``, based on the current 309 automatically added for us by ``common.js``, based on the current
308 toolchain/configuration combination: 310 toolchain/configuration combination:
309 311
310 .. naclcode:: 312 .. naclcode::
311 313
312 <!-- 314 <!--
313 Just as in part1, the <embed> element will be wrapped inside the <div> 315 Just as in part1, the <embed> element will be wrapped inside the <div>
314 element with the id "listener". In part1, the embed was specified in HTML, 316 element with the id "listener". In part1, the embed was specified in HTML,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // postMessage sends a message to it. 491 // postMessage sends a message to it.
490 common.naclModule.postMessage('hello'); 492 common.naclModule.postMessage('hello');
491 } 493 }
492 494
493 // This function is called by common.js when a message is received from the 495 // This function is called by common.js when a message is received from the
494 // NaCl module. 496 // NaCl module.
495 function handleMessage(message) { 497 function handleMessage(message) {
496 var logEl = document.getElementById('log'); 498 var logEl = document.getElementById('log');
497 logEl.textContent += message.data; 499 logEl.textContent += message.data;
498 } 500 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698