Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4149281
ErrorWidget.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
751 B
Referenced Files
None
Subscribers
None
ErrorWidget.js
View Options
/**
* A Codex Message component implementation specialized for the "error" type.
*/
class
ErrorWidget
{
constructor
()
{
const
$icon
=
$
(
'<span>'
).
addClass
(
'cdx-message__icon'
);
this
.
$content
=
$
(
'<div>'
).
addClass
(
'cdx-message__content'
);
this
.
$element
=
$
(
'<div>'
)
.
attr
(
{
class
:
'cdx-message cdx-message--block cdx-message--error'
,
role
:
'alert'
}
)
.
append
(
$icon
)
.
append
(
this
.
$content
);
this
.
$element
.
hide
();
}
/**
* Display the widget with the given message.
*
* @param {string} message The message to be shown (will be HTML-escaped)
*/
show
(
message
)
{
this
.
$content
.
text
(
message
);
this
.
$element
.
show
();
}
hide
()
{
this
.
$element
.
hide
();
}
}
module
.
exports
=
ErrorWidget
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 19 2026, 19:07 (6 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
35/a2/596a732eeeaf33117d3f3a0f91af
Default Alt Text
ErrorWidget.js (751 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment