Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Ppx_htmx.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
(** https://htmx.org/reference/ *) open Ppx_attributes let core_attributes = [ Rich_attribute { name = "hx-boost"; jsxName = "hx_boost"; type_ = BooleanishString; description = "add or remove progressive enhancement for links and forms"; url = "https://htmx.org/attributes/hx-boost"; }; Rich_attribute { name = "hx-get"; jsxName = "hx_get"; type_ = String; description = "issues a GET to the specified URL"; url = "https://htmx.org/attributes/hx-get"; }; Rich_attribute { name = "hx-post"; jsxName = "hx_post"; type_ = String; description = "issues a POST to the specified URL"; url = "https://htmx.org/attributes/hx-post"; }; (* Not sure how to support those Rich_attribute { name = "hx-on"; jsxName = "hx_on"; type_ = String; description = "handle any event with a script inline"; url = "https://htmx.org/attributes/hx-on"; }; *) (* Attribute { name = "hx-push-url"; jsxName = "hx_push_url"; type_ = String; description = "pushes the URL into the browser location bar, creating a new history entry"; url = "https://htmx.org/attributes/hx-get"; }; *) Rich_attribute { name = "hx-select"; jsxName = "hx_select"; type_ = String; description = "select content to swap in from a response"; url = "https://htmx.org/attributes/hx-select"; }; Rich_attribute { name = "hx-select-oob"; jsxName = "hx_select_oob"; type_ = String; description = "select content to swap in from a response, out of band (somewhere \ other than the target)"; url = "https://htmx.org/attributes/hx-select-oob"; }; Rich_attribute { name = "hx-swap"; jsxName = "hx_swap"; type_ = String; description = "marks content in a response to be out of band (should swap in \ somewhere other than the target)"; url = "https://htmx.org/attributes/hx-swap"; }; Rich_attribute { name = "hx-swap-oob"; jsxName = "hx_swap_oob"; type_ = String; description = "specifies the target element to be swapped"; url = "https://htmx.org/attributes/hx-swap-oob"; }; Rich_attribute { name = "hx-target"; jsxName = "hx_target"; type_ = String; description = "specifies the event that triggers the request"; url = "https://htmx.org/attributes/hx-target"; }; Rich_attribute { name = "hx-trigger"; jsxName = "hx_trigger"; type_ = String; description = "specifies the event that triggers the request"; url = "https://htmx.org/attributes/hx-trigger"; }; Rich_attribute { name = "hx-vals"; jsxName = "hx_vals"; type_ = String; description = "adds values to the parameters to submit with the request \ (JSON-formatted)"; url = "https://htmx.org/attributes/hx-vals"; }; ] let additional_attributes = [ Rich_attribute { name = "hx-confirm"; jsxName = "hx_confirm"; type_ = String; description = "shows a confirm() dialog before issuing a request"; url = "https://htmx.org/attributes/hx-confirm"; }; Rich_attribute { name = "hx-delete"; jsxName = "hx_delete"; type_ = String; description = "issues a DELETE to the specified URL"; url = "https://htmx.org/attributes/hx-delete"; }; Rich_attribute { name = "hx-disable"; jsxName = "hx_disable"; type_ = Bool; description = "disables htmx processing for the given node and any children nodes"; url = "https://htmx.org/attributes/hx-disable"; }; Rich_attribute { name = "hx-disabled-elt"; jsxName = "hx_disabled_elt"; type_ = String; description = "adds the `disabled` attribute to the specified elements while a \ request is in flight"; url = "https://htmx.org/attributes/hx-disabled-elt"; }; Rich_attribute { name = "hx-disinherit"; jsxName = "hx_disinherit"; type_ = String; description = "control and disable automatic attribute inheritance for child nodes"; url = "https://htmx.org/attributes/hx-disinherit"; }; Rich_attribute { name = "hx-encoding"; jsxName = "hx_encoding"; type_ = String; description = "changes the request encoding type"; url = "https://htmx.org/attributes/hx-encoding"; }; Rich_attribute { name = "hx-ext"; jsxName = "hx_ext"; type_ = String; description = "extensions to use for this element"; url = "https://htmx.org/attributes/hx-ext"; }; Rich_attribute { name = "hx-headers"; jsxName = "hx_headers"; type_ = String; description = "adds to the headers that will be submitted with the request"; url = "https://htmx.org/attributes/hx-headers"; }; Rich_attribute { name = "hx-history"; jsxName = "hx_history"; type_ = BooleanishString; description = "prevent sensitive data being saved to the history cache"; url = "https://htmx.org/attributes/hx-history"; }; Rich_attribute { name = "hx-history-elt"; jsxName = "hx_history_elt"; type_ = Bool; description = "the element to snapshot and restore during history navigation"; url = "https://htmx.org/attributes/hx-history-elt"; }; Rich_attribute { name = "hx-include"; jsxName = "hx_include"; type_ = String; description = "include additional data in requests"; url = "https://htmx.org/attributes/hx-include"; }; Rich_attribute { name = "hx-indicator"; jsxName = "hx_indicator"; type_ = String; description = "the element to put the htmx-request class on during the request"; url = "https://htmx.org/attributes/hx-indicator"; }; Rich_attribute { name = "hx-params"; jsxName = "hx_params"; type_ = String; description = "filters the parameters that will be submitted with a request"; url = "https://htmx.org/attributes/hx-params"; }; Rich_attribute { name = "hx-patch"; jsxName = "hx_patch"; type_ = String; description = "issues a PATCH to the specified URL"; url = "https://htmx.org/attributes/hx-patch"; }; Rich_attribute { name = "hx-preserve"; jsxName = "hx_preserve"; type_ = Bool; description = "specifies elements to keep unchanged between requests"; url = "https://htmx.org/attributes/hx-preserve"; }; Rich_attribute { name = "hx-prompt"; jsxName = "hx_prompt"; type_ = String; description = "shows a prompt() before submitting a request"; url = "https://htmx.org/attributes/hx-prompt"; }; Rich_attribute { name = "hx-put"; jsxName = "hx_put"; type_ = String; description = "issues a PUT to the specified URL"; url = "https://htmx.org/attributes/hx-put"; }; Rich_attribute { name = "hx-replace-url"; jsxName = "hx_replace_url"; type_ = String; description = "replace the URL in the browser location bar"; url = "https://htmx.org/attributes/hx-replace-url"; }; Rich_attribute { name = "hx-request"; jsxName = "hx_request"; type_ = String; description = "configures various aspects of the request"; url = "https://htmx.org/attributes/hx-request"; }; Rich_attribute { name = "hx-sync"; jsxName = "hx_sync"; type_ = String; description = "control how requests made by different elements are synchronized"; url = "https://htmx.org/attributes/hx-get"; }; Rich_attribute { name = "hx-validate"; jsxName = "hx_validate"; type_ = Bool; description = "force elements to validate themselves before a request"; url = "https://htmx.org/attributes/hx-validate"; }; ] let attributes = core_attributes @ additional_attributes