Registry Mirror
搜索
Skip to content
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Files
Expand file tree
master
Breadcrumbs
Localizer
/
replaceInnerContent.js
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
25 lines (24 loc) · 716 Bytes
master
Breadcrumbs
Localizer
/
replaceInnerContent.js
Copy path
Top
File metadata and controls
Code
Blame
25 lines (24 loc) · 716 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* Contains the function that does replacements of the data in the HTML element.
*
* This version of this file does not allow HTML code to be injected. Thus it is
* safer to use and avoids problems with some linters that point out the usage of
* "innerHtml".
*
* @package
* @module Localizer
*/
/**
* Replaces inner content of the HTML element.
*
* This function ignores a potential third parameter and thus does not allow
* you to insert HTML code, but always interprets it as text.
*
* @protected
* @param {HTMLElement} elem
* @param {string} translatedMessage
* @returns {void}
*/
export function replaceInnerContent(elem, translatedMessage) {
elem.textContent = translatedMessage;
}
You can’t perform that action at this time.