MCPcopy Create free account
hub / github.com/apache/cloudstack / setDocumentTitle

Function setDocumentTitle

ui/src/utils/domUtil.js:18–34  ·  view source on GitHub ↗
(title)

Source from the content-addressed store, hash-verified

16// under the License.
17
18export const setDocumentTitle = function (title) {
19 document.title = title
20 const ua = navigator.userAgent
21 // eslint-disable-next-line
22 const regex = /\bMicroMessenger\/([\d\.]+)/
23 if (regex.test(ua) && /ip(hone|od|ad)/i.test(ua)) {
24 const i = document.createElement('iframe')
25 i.src = '/favicon.ico'
26 i.style.display = 'none'
27 i.onload = function () {
28 setTimeout(function () {
29 i.remove()
30 }, 9)
31 }
32 document.body.appendChild(i)
33 }
34}

Callers 1

permission.jsFile · 0.90

Calls 2

removeMethod · 0.65
testMethod · 0.45

Tested by

no test coverage detected