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

Side by Side Diff: native_client_sdk/src/examples/demo/nacl_io/example.js

Issue 111833002: Add missing argument to Element.setAttribute() calls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function moduleDidLoad() { 5 function moduleDidLoad() {
6 common.hideModule(); 6 common.hideModule();
7 } 7 }
8 8
9 // Called by the common.js module. 9 // Called by the common.js module.
10 function domContentLoaded(name, tc, config, width, height) { 10 function domContentLoaded(name, tc, config, width, height) {
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 function onRadioClicked(e) { 41 function onRadioClicked(e) {
42 var divId = this.id.slice(5); // skip "radio" 42 var divId = this.id.slice(5); // skip "radio"
43 var functionEls = document.querySelectorAll('.function'); 43 var functionEls = document.querySelectorAll('.function');
44 for (var i = 0; i < functionEls.length; ++i) { 44 for (var i = 0; i < functionEls.length; ++i) {
45 var visible = functionEls[i].id === divId; 45 var visible = functionEls[i].id === divId;
46 if (functionEls[i].id === divId) 46 if (functionEls[i].id === divId)
47 functionEls[i].removeAttribute('hidden'); 47 functionEls[i].removeAttribute('hidden');
48 else 48 else
49 functionEls[i].setAttribute('hidden'); 49 functionEls[i].setAttribute('hidden', '');
50 } 50 }
51 } 51 }
52 52
53 function addNameToSelectElements(cssClass, handle, name) { 53 function addNameToSelectElements(cssClass, handle, name) {
54 var text = '[' + handle + '] ' + name; 54 var text = '[' + handle + '] ' + name;
55 var selectEls = document.querySelectorAll(cssClass); 55 var selectEls = document.querySelectorAll(cssClass);
56 for (var i = 0; i < selectEls.length; ++i) { 56 for (var i = 0; i < selectEls.length; ++i) {
57 var optionEl = document.createElement('option'); 57 var optionEl = document.createElement('option');
58 optionEl.setAttribute('value', handle); 58 optionEl.setAttribute('value', handle);
59 optionEl.appendChild(document.createTextNode(text)); 59 optionEl.appendChild(document.createTextNode(text));
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 if (!resultFunc) { 312 if (!resultFunc) {
313 common.logMessage('Error: Bad message ' + funcName + 313 common.logMessage('Error: Bad message ' + funcName +
314 ' received from NaCl module.'); 314 ' received from NaCl module.');
315 return; 315 return;
316 } 316 }
317 317
318 resultFunc.apply(null, params.slice(1)); 318 resultFunc.apply(null, params.slice(1));
319 } 319 }
320 } 320 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/examples/demo/drive/example.js ('k') | native_client_sdk/src/gonacl_appengine/static/frame.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698