Skip to content

Commit

Permalink
Merge pull request #55 from Hi-Angel/support-dialog-onclose
Browse files Browse the repository at this point in the history
DOM: support `onClose` event in `dialog` element
  • Loading branch information
pete-murphy authored Nov 8, 2024
2 parents b93b156 + 19b0082 commit a0ed953
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 16 deletions.
1 change: 1 addition & 0 deletions codegen/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ module.exports.types = {
"onCanPlayThrough": "EventHandler",
"onChange": "EventHandler",
"onClick": "EventHandler",
"onClose": "EventHandler",
"onCompositionEnd": "EventHandler",
"onCompositionStart": "EventHandler",
"onCompositionUpdate": "EventHandler",
Expand Down
19 changes: 9 additions & 10 deletions codegen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ const htmlGenFile = "../src/React/Basic/DOM/Generated.purs";
const htmlSimplifiedGenFile = "../src/React/Basic/DOM/Simplified/Generated.purs";
const svgGenFile = "../src/React/Basic/DOM/SVG.purs";

const htmlHeader = `-- | ----------------------------------------
const warningHeader = `-- | ------------------------------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
-- | Instead edit files under 'codegen/' dir and regenerate with:
-- | npm install
-- | node ./index.js
-- | ------------------------------------------------------------
`;

const htmlHeader = `${warningHeader}
module React.Basic.DOM.Generated where
import Data.Nullable (Nullable)
Expand All @@ -23,10 +28,7 @@ import Web.DOM (Node)
`;

const simplifiedHtmlHeader = `-- | ----------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
const simplifiedHtmlHeader = `${warningHeader}
module React.Basic.DOM.Simplified.Generated where
import Data.Nullable (Nullable)
Expand Down Expand Up @@ -55,10 +57,7 @@ const propType = (e, p) => {
}
}

const svgHeader = `-- | ----------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
const svgHeader = `${warningHeader}
module React.Basic.DOM.SVG where
import Data.Nullable (Nullable)
Expand Down
1 change: 1 addition & 0 deletions codegen/react-html-attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
"title"
],
"dialog": [
"onClose",
"open"
],
"embed": [
Expand Down
8 changes: 6 additions & 2 deletions src/React/Basic/DOM/Generated.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-- | ----------------------------------------
-- | ------------------------------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
-- | Instead edit files under 'codegen/' dir and regenerate with:
-- | npm install
-- | node ./index.js
-- | ------------------------------------------------------------

module React.Basic.DOM.Generated where

Expand Down Expand Up @@ -4310,6 +4313,7 @@ type Props_dialog =
, onAnimationStart :: EventHandler
, onBlur :: EventHandler
, onClick :: EventHandler
, onClose :: EventHandler
, onCompositionEnd :: EventHandler
, onCompositionStart :: EventHandler
, onCompositionUpdate :: EventHandler
Expand Down
7 changes: 5 additions & 2 deletions src/React/Basic/DOM/SVG.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-- | ----------------------------------------
-- | ------------------------------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
-- | Instead edit files under 'codegen/' dir and regenerate with:
-- | npm install
-- | node ./index.js
-- | ------------------------------------------------------------

module React.Basic.DOM.SVG where

Expand Down
8 changes: 6 additions & 2 deletions src/React/Basic/DOM/Simplified/Generated.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-- | ----------------------------------------
-- | ------------------------------------------------------------
-- | THIS FILE IS GENERATED -- DO NOT EDIT IT
-- | ----------------------------------------
-- | Instead edit files under 'codegen/' dir and regenerate with:
-- | npm install
-- | node ./index.js
-- | ------------------------------------------------------------

module React.Basic.DOM.Simplified.Generated where

Expand Down Expand Up @@ -3884,6 +3887,7 @@ type Props_dialog =
, onAnimationStart :: EventHandler
, onBlur :: EventHandler
, onClick :: EventHandler
, onClose :: EventHandler
, onCompositionEnd :: EventHandler
, onCompositionStart :: EventHandler
, onCompositionUpdate :: EventHandler
Expand Down

0 comments on commit a0ed953

Please sign in to comment.