From 9e13e43019242d3a3fae17b3a3a5b79f866259f1 Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 16 Dec 2015 16:26:53 +0000 Subject: [PATCH] Allow definition of custom attributes Close #13 --- src/GHCJS/VDOM/Attribute.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/GHCJS/VDOM/Attribute.hs b/src/GHCJS/VDOM/Attribute.hs index 3119043..a896590 100644 --- a/src/GHCJS/VDOM/Attribute.hs +++ b/src/GHCJS/VDOM/Attribute.hs @@ -2,6 +2,7 @@ module GHCJS.VDOM.Attribute ( Attribute , Attributes + , custom -- * some predefined attributes , class_ , id @@ -26,6 +27,9 @@ import GHCJS.Types import GHCJS.VDOM.Internal.Types import GHCJS.VDOM.Internal +custom :: JSString -> JSVal -> Attribute +custom = Attribute + mkAttrs ''JSString [ "id", "href", "src", "alt", "title" , "lang", "name", "target", "value" ]