Toggle navigation
Toggle navigation
This project
Loading...
Sign in
I_Jemin
/
Node-Study
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
I_Jemin
2018-03-22 00:05:03 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c06cc8be50e25cc58f70ad4f4c1b018f64c11023
c06cc8be
1 parent
e4aa6aab
Emitter Practice
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
app.js
app.js
View file @
c06cc8b
...
...
@@ -6,6 +6,9 @@ emitter.on('messageLogged', (arg) => {
console
.
log
(
'Listener called'
,
arg
);
});
emitter
.
emit
(
'messageLogged'
,
{
id
:
1
,
url
:
'http://'
});
emitter
.
on
(
'logging'
,
(
e
)
=>
{
console
.
log
(
'Loggin Event'
,
e
);
});
emitter
.
emit
(
'messageLogged'
,
{
id
:
1
,
url
:
'http://'
});
// Raise: logging (data: message)
emitter
.
emit
(
'logging'
,
'Jemin'
);
...
...
Please
register
or
login
to post a comment