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

Side by Side Diff: Source/devtools/front_end/documentation/DocumentationURLFormer.js

Issue 447703002: DocumentationURLProvider class created (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@semen
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /**
lushnikov 2014/08/06 11:25:18 LICENSE is missing
semeny 2014/08/06 17:17:30 Done.
2 * @constructor
3 */
4 WebInspector.DocumentationURLFormer = function() {}
lushnikov 2014/08/06 11:25:18 DocumentationURLProvider?
semeny 2014/08/06 17:17:29 Done.
5
6 WebInspector.DocumentationURLFormer.prototype = {
7 /**
8 * @param {string} searchTerm
9 * @return {string}
10 */
11 formItemPath: function(searchTerm)
12 {
13 for (var i = 0; i < this._Sources.length; i++) {
lushnikov 2014/08/06 11:25:17 Our codestyle requires ++i
semeny 2014/08/06 17:17:29 Done.
14 var source = this._Sources[i].source;
15 var url = this._Sources[i].url;
16 if (source[searchTerm] instanceof Function)
17 return "http://docs.webplatform.org/w/api.php?action=query&title s=" + url
lushnikov 2014/08/06 11:25:18 use String.sprintf
semeny 2014/08/06 17:17:29 Done.
18 + searchTerm + "&prop=revisions&rvprop=timestamp|content& format=json";
19 }
20 return "NONE";
lushnikov 2014/08/06 11:25:17 return null;
semeny 2014/08/06 17:17:29 Done.
21 },
22
23 _Sources: [
lushnikov 2014/08/06 11:25:17 This should be a field on WebInspector.Documentati
semeny 2014/08/06 17:17:30 Done.
24 {source: window, url: "javascript/"},
25 {source: window.Node.prototype, url: "dom/Node/"},
26 {source: window.Object, url: "javascript/Object/"},
27 {source: window.Math, url: "javascript/Math/"},
28 {source: window.Array, url: "javascript/Array/"},
29 {source: window.String, url: "javascript/String/"},
30 {source: window.Date, url: "javascript/Date/"},
31 {source: window.JSON, url: "javascript/JSON/"}
32 ]
33 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698