Skip to content

Commit 309634a

Browse files
committed
Add missing text coercions
1 parent dae0da0 commit 309634a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Web/DOM/Text.purs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,24 @@ module Web.DOM.Text where
33
import Effect (Effect)
44
import Unsafe.Coerce (unsafeCoerce)
55
import Web.DOM.CharacterData (CharacterData)
6+
import Web.DOM.ChildNode (ChildNode)
7+
import Web.DOM.Internal.Types (Node)
8+
import Web.DOM.NonDocumentTypeChildNode (NonDocumentTypeChildNode)
69

710
foreign import data Text :: Type
811

912
toCharacterData :: Text -> CharacterData
1013
toCharacterData = unsafeCoerce
1114

15+
toChildNode :: Text -> ChildNode
16+
toChildNode = unsafeCoerce
17+
18+
toNonDocumentTypeChildNode :: Text -> NonDocumentTypeChildNode
19+
toNonDocumentTypeChildNode = unsafeCoerce
20+
21+
toNode :: Text -> Node
22+
toNode = unsafeCoerce
23+
1224
foreign import splitText :: Int -> Text -> Effect Text
1325

1426
foreign import wholeText :: Text -> Effect String

0 commit comments

Comments
 (0)