DevTools: Convert concatenated string and link to embedded link in string in remote devices tab
Use UI.formatLocalize to embed a link inside a localizable string. UI.formatLocalized takes a string and a list of strings or DOM elements. A span element is created, and a string is appended as a text node through appendChild(createTextNode(str)), while an element is just appended through appendChild(element). Code: https://cs.chromium.org/chromium/src/third_party/blink/renderer/devtools/front_end/ui/UIUtils.js?type=cs&q=uiutils.js&sq=package:chromium&g=0&l=622 Example before vs after: https://imgur.com/XBouvPo There are other places where the same change can be applied. To keep this patch small I only modified the remote devices tab. Sebsequent patches will be made. Bug: 941561 Change-Id: Iaf1ed0451c2f748943c4b9dfc918a969e1c24d03 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1658750 Commit-Queue: Mandy Chen <mandy.chen@microsoft.com> Reviewed-by:Alexei Filippov <alph@chromium.org> Cr-Commit-Position: refs/heads/master@{#669072}
Showing
Please register or sign in to comment