Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit 1ae5bbf

Browse files
committed
Added ErrorEvent properties
1 parent fc27838 commit 1ae5bbf

File tree

3 files changed

+34
-10
lines changed

3 files changed

+34
-10
lines changed

src/DOM/Event/CloseEvent.purs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,9 @@ module DOM.Event.CloseEvent
44
, wasClean
55
) where
66

7-
import Prelude
7+
import Data.Maybe.Unsafe as U
8+
import DOM.Event.Types (CloseEvent)
89

9-
import Control.Monad.Eff (Eff())
10-
11-
import Data.Enum (toEnum)
12-
import qualified Data.Maybe.Unsafe as U
13-
14-
import DOM
15-
import DOM.Event.EventPhase
16-
import DOM.Event.Types
17-
import DOM.Node.Types
1810

1911
foreign import code :: CloseEvent -> Int
2012
foreign import reason :: CloseEvent -> String

src/DOM/Event/ErrorEvent.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"use strict";
2+
3+
// module DOM.Event.ErrorEvent
4+
5+
exports.message = function (e) {
6+
e.message;
7+
};
8+
9+
exports.fileName = function (e) {
10+
e.filename;
11+
};
12+
13+
exports.lineNo = function (e) {
14+
e.lineno;
15+
};
16+
17+
exports.colNo = function (e) {
18+
e.colno;
19+
};

src/DOM/Event/ErrorEvent.purs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module DOM.Event.ErrorEvent
2+
( message
3+
, fileName
4+
, lineNo
5+
, colNo
6+
) where
7+
8+
import DOM.Event.Types (ErrorEvent)
9+
10+
foreign import message :: ErrorEvent -> String
11+
foreign import fileName :: ErrorEvent -> String
12+
foreign import lineNo :: ErrorEvent -> Int
13+
foreign import colNo :: ErrorEvent -> Int

0 commit comments

Comments
 (0)