Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F9582833
html.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
html.ts
View Options
import
{
FlatTemplatable
}
from
"tempstream"
;
import
{
FormControl
,
FormControlContext
}
from
"./form-control.js"
;
type
Renderer
=
|
((
fctx
:
FormControlContext
)
=>
FlatTemplatable
)
|
FlatTemplatable
;
export
class
HTML
extends
FormControl
{
role
=
(
<
const
>
"decoration"
)
as
"decoration"
|
"submit"
;
public
renderer
:
Renderer
;
constructor
(
role
:
"decoration"
|
"submit"
,
renderer
:
Renderer
);
constructor
(
renderer
:
Renderer
);
constructor
(
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
role_or_renderer
:
"decoration"
|
"submit"
|
Renderer
,
renderer_or_undefined
?:
Renderer
|
FlatTemplatable
)
{
super
();
if
(
arguments
.
length
==
2
)
{
this
.
role
=
role_or_renderer
as
"decoration"
|
"submit"
;
this
.
renderer
=
renderer_or_undefined
as
Renderer
;
}
else
{
this
.
renderer
=
role_or_renderer
;
}
}
async
render
(
fctx
:
FormControlContext
)
:
Promise
<
FlatTemplatable
>
{
if
(
typeof
this
.
renderer
===
"string"
)
{
return
this
.
renderer
;
}
return
typeof
this
.
renderer
==
"function"
?
this
.
renderer
(
fctx
)
:
this
.
renderer
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sat, Oct 11, 07:55 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
984005
Default Alt Text
html.ts (1 KB)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment