| 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)
|
|
|