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

Unified Diff: Source/devtools/front_end/ui/UIUtils.js

Issue 659573005: DevTools: NetworkPanel: show link where resource timing is explained. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/sources/sourcesView.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/UIUtils.js
diff --git a/Source/devtools/front_end/ui/UIUtils.js b/Source/devtools/front_end/ui/UIUtils.js
index 0730e8cc62146c6ea5a42cba7e7efe12aa53bb5f..4280871cddc5e261460c42204004e717a23cc0a6 100644
--- a/Source/devtools/front_end/ui/UIUtils.js
+++ b/Source/devtools/front_end/ui/UIUtils.js
@@ -1143,6 +1143,41 @@ WebInspector.LongClickController.prototype = {
}
/**
+ * @param {string} url
+ * @param {string=} linkText
+ * @param {boolean=} isInternal
+ * @return {!Element}
+ */
+WebInspector.createAnchor = function(url, linkText, isInternal)
+{
+ var anchor = createElementWithClass("a", "link");
+ var href = sanitizeHref(url);
+
+ if (href)
+ anchor.href = href;
+ anchor.title = url;
+
+ if (!linkText)
+ linkText = url;
+ anchor.textContent = linkText;
+
+ if (!isInternal)
+ anchor.setAttribute("target", "_blank");
+
+ return anchor;
+}
+
+/**
+ * @param {string} article
+ * @param {string} title
+ * @return {!Element}
+ */
+WebInspector.createDocumentationAnchor = function(article, title)
+{
+ return WebInspector.createAnchor("https://developer.chrome.com/devtools/docs/" + article, title);
+}
+
+/**
* @param {!Window} window
*/
WebInspector.initializeUIUtils = function(window)
« no previous file with comments | « Source/devtools/front_end/sources/sourcesView.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698