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

Side by Side Diff: Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 340513003: DevTools: Add JSDoc for static methods, fix JSDoc types and induced errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 * @this {WebInspector.ConsoleViewMessage} 747 * @this {WebInspector.ConsoleViewMessage}
748 */ 748 */
749 function onInvokeGetterClick(result, wasThrown) 749 function onInvokeGetterClick(result, wasThrown)
750 { 750 {
751 if (!result) 751 if (!result)
752 return; 752 return;
753 rootElement.removeChildren(); 753 rootElement.removeChildren();
754 if (wasThrown) { 754 if (wasThrown) {
755 var element = rootElement.createChild("span", "error-message"); 755 var element = rootElement.createChild("span", "error-message");
756 element.textContent = WebInspector.UIString("<exception>"); 756 element.textContent = WebInspector.UIString("<exception>");
757 element.title = result.description; 757 element.title = /** @type {string} */ (result.description);
758 } else if (isArrayEntry) { 758 } else if (isArrayEntry) {
759 rootElement.appendChild(this._formatAsArrayEntry(result)); 759 rootElement.appendChild(this._formatAsArrayEntry(result));
760 } else { 760 } else {
761 // Make a PropertyPreview from the RemoteObject similar to the b ackend logic. 761 // Make a PropertyPreview from the RemoteObject similar to the b ackend logic.
762 const maxLength = 100; 762 const maxLength = 100;
763 var type = result.type; 763 var type = result.type;
764 var subtype = result.subtype; 764 var subtype = result.subtype;
765 var description = ""; 765 var description = "";
766 if (type !== "function" && result.description) { 766 if (type !== "function" && result.description) {
767 if (type === "string" || subtype === "regexp") 767 if (type === "string" || subtype === "regexp")
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 { 1237 {
1238 if (!this._wrapperElement) { 1238 if (!this._wrapperElement) {
1239 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1239 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1240 this._wrapperElement.classList.toggle("collapsed", this._collapsed); 1240 this._wrapperElement.classList.toggle("collapsed", this._collapsed);
1241 } 1241 }
1242 return this._wrapperElement; 1242 return this._wrapperElement;
1243 }, 1243 },
1244 1244
1245 __proto__: WebInspector.ConsoleViewMessage.prototype 1245 __proto__: WebInspector.ConsoleViewMessage.prototype
1246 } 1246 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698