Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F9583514
action.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
629 B
Referenced Files
None
Subscribers
None
action.js
View Options
var
Sealious
=
require
(
"sealious"
);
var
Promise
=
require
(
"bluebird"
);
function
Action
(
subject_path
,
action_name
)
{
this
.
subject_path
=
new
Sealious
.
SubjectPath
(
subject_path
);
this
.
action_name
=
action_name
}
Action
.
prototype
=
new
function
(){
this
.
perform
=
this
.
run
=
function
(
context
){
var
self
=
this
;
var
args
=
Array
.
prototype
.
slice
.
call
(
arguments
,
1
);
return
Promise
.
try
(
function
(){
return
Sealious
.
RootSubject
.
get_subject
(
self
.
subject_path
)
.
then
(
function
(
subject
){
return
subject
.
perform_action
.
apply
(
subject
,
[
context
,
self
.
action_name
].
concat
(
args
))
})
})
}
}
module
.
exports
=
Action
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 11, 09:55 (5 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
984165
Default Alt Text
action.js (629 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment