Commit Graph

112 Commits

Author SHA1 Message Date
Jonathan Kingston 105156542e Adding support for the ARIA role attribute 2019-05-28 16:03:12 +02:00
Bodil Stokke 5334d783f2 Use TryFrom rather than panicking From implementations to do attribute conversion.
Now that it's landed in stable and all.
2019-04-12 20:00:33 +01:00
Bodil Stokke 91c3d9864a
Merge pull request #39 from ckampfe/add-unsafe-text
add unsafe_text
2019-04-08 15:56:11 +01:00
Bodil Stokke 5cb65597bb
Merge pull request #42 from iamcodemaker/event
Make Events struct more generic, use standard From/Into traits
2019-04-08 15:52:20 +01:00
Bodil Stokke 2a6390e849
Merge branch 'master' into dependabot/cargo/strum-0.15.0 2019-04-08 15:18:22 +01:00
Matthew Nicholson 2c500dc3f4 add tests for Events iterators 2019-04-01 00:46:46 -04:00
Matthew Nicholson 6f1021b4a3 implement `IntoIterator` for `Events` 2019-04-01 00:46:46 -04:00
Matthew Nicholson d4aee284e5 add iter_mut method to events struct 2019-04-01 00:46:46 -04:00
Matthew Nicholson b1d7f80dad remove now unused `IntoEventHandler` trait 2019-04-01 00:46:46 -04:00
Matthew Nicholson 44436da495 use the standard `From` trait instead of `IntoEventHandler` 2019-04-01 00:46:46 -04:00
Matthew Nicholson 559359b2ff add an iterator over all events
This iterator returns tuples conntaining the event name and whatever the
value is.
2019-04-01 00:46:46 -04:00
Matthew Nicholson 3edc4c3fa0 use generic events struct instead of `StringEvents`
This new structure is generic over any type that implents `From`/`Into`
for the type specified.
2019-03-31 02:04:30 -04:00
dependabot[bot] c2d0fa7a97
Update strum_macros requirement from 0.14.0 to 0.15.0
Updates the requirements on [strum_macros](https://github.com/Peternator7/strum) to permit the latest version.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-27 06:02:55 +00:00
dependabot[bot] 95233e4d7b
Update strum requirement from 0.14.0 to 0.15.0
Updates the requirements on [strum](https://github.com/Peternator7/strum) to permit the latest version.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-27 06:02:45 +00:00
Clark Kampfe 4f8ce04fae handle unsafetext match arm in stdweb 2019-03-26 22:30:14 -05:00
Clark Kampfe 7e842d9d78 add unsafe_text 2019-03-26 21:31:48 -05:00
Bodil Stokke d63c2ef07b Release 0.2.0 2019-03-16 21:53:23 +00:00
Bodil Stokke bf3f5a4e2a Add missing attributes to video element.
Closes #32.
2019-03-16 21:39:45 +00:00
Bodil Stokke f628e63e63 Revert accidental de-Booling and add missing <input> attrs. 2019-03-16 20:59:14 +00:00
Bodil Stokke e2f6fd0c08 Add in some missing types, conversions and utility methods. 2019-03-16 20:58:51 +00:00
Bodil Stokke 813121b3a7 Dodrio support with a bespoke macro. 2019-03-16 03:18:49 +00:00
Bodil Stokke dbb4ba8738 2018 edition. 2019-03-15 23:37:20 +00:00
Bodil Stokke 10ad3b2abc Bump some deps. 2019-03-15 14:05:05 +00:00
dependabot[bot] bd4d4dec81
Update strum requirement from 0.13.0 to 0.14.0
Updates the requirements on [strum](https://github.com/Peternator7/strum) to permit the latest version.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-05 05:38:52 +00:00
Bodil Stokke eb1174ae97 Stop rustc complaining about non-camel case types. 2019-01-17 12:56:41 +00:00
Bodil Stokke 77888b20e5 Alias the Uri type to String.
Closes #30.
Closes #31.
2019-01-17 12:56:22 +00:00
Bodil Stokke eff3f2289a Bump strum. 2019-01-04 22:39:33 +00:00
lunchhunter c2584878a5
Fix `data-` prefix duplication
The `data-` prefix is being duplicated, such that `data-foo="bar"` is
being rendered as `data-data-foo="bar"`.

This change removes the prefix at the `Element` level, and leaves its
addition at the `Display` level, causing it to be rendered correctly.
2018-12-04 16:23:03 -08:00
Bodil Stokke 4c49aca99f
Merge pull request #22 from bodil/generic-events
Generic event types.
2018-12-03 17:03:38 +00:00
Bodil Stokke 818c8ebdac Make it generic on event type, determined by output type.
Unfortunately, this means the macro now requires a type annotation when 
using event handlers.

Closes #6, #17.
2018-12-01 18:33:34 +00:00
Bodil Stokke 77a3c6d840 Back to dev mode. 2018-11-30 13:44:37 +00:00
Richard Dodd (dodj) d87c9f81b1
Change `nav` to contain flow content -
I'm pretty sure you should be able to do

```html
<nav>
  <ol>
    <li>Test</li>
  </ol>
</nav>
```
2018-11-29 20:10:40 +00:00
Bodil Stokke d4c5121172 Release 0.1.1 2018-11-29 17:52:08 +00:00
Bodil Stokke 270e3b52e1 Implement IntoIterator for all marker traits.
Further closes #12.
2018-11-29 16:37:07 +00:00
Jonathan Kingston 460681b5ec Formatting fixes 2018-11-24 16:13:58 +00:00
Jonathan Kingston b74e8e5bc1 Handle bool attributes. Fixes #13 2018-11-24 13:21:41 +00:00
David Tolnay 0e4123f927
Stable still requires lifetimes here 2018-11-18 02:51:16 -08:00
David Tolnay 0ec3be89cc
Support nested invocations of html macro 2018-11-18 02:45:07 -08:00
David Tolnay 893566118d
Remove proc_macro_hygiene feature 2018-11-18 02:45:06 -08:00
Bodil Stokke c036b7c7c5 Fix doc typo. 2018-11-17 23:06:48 +00:00
Bodil Stokke 43550de7b8 Prepare for initial release. 2018-11-17 22:37:19 +00:00
Bodil Stokke ce0b876c50 We have tests now, we don't need bin/main.rs 2018-11-17 21:50:26 +00:00
Bodil Stokke bc94387213 Toplevel docs. 2018-11-17 21:49:45 +00:00
Bodil Stokke 2c53d5d2ca Implement Metadata + HTTPEquiv types for meta elements. 2018-11-17 21:49:38 +00:00
Bodil Stokke 5a72616f97 Remove need to enable feature(try_from). 2018-11-17 21:49:04 +00:00
Bodil Stokke 276ba31432 Documentation++. 2018-11-17 20:38:07 +00:00
Bodil Stokke 28513b93e9 Docs and cleanups. 2018-11-17 14:25:32 +00:00
Bodil Stokke 001a7ba016 Parameterise nodes etc on output type, so we can type event handlers based on it.
With this, Node<String> only accepts event handlers implemented
for String, etc. No danger of trying to stringify functions and vice versa.
2018-11-16 23:33:11 +00:00
Bodil Stokke 2b95530637 Better event handler conversion. 2018-11-16 00:34:13 +00:00
Bodil Stokke a9dc58da9c Event handlers! 2018-11-15 23:25:38 +00:00
Bodil Stokke cc8e7219a2 Reorganise, docs, HTML escaping. 2018-11-14 18:25:05 +00:00
Bodil Stokke 7d1e95f262 Completely transitioned to LALRPOP and new declare macro. 2018-11-14 16:22:07 +00:00
Bodil Stokke cb7e148310 A mess of LALRPOP. 2018-11-14 00:30:59 +00:00
Bodil Stokke 0db3bfb8bc All HTML elements added, I think. 2018-11-13 00:48:29 +00:00
Bodil Stokke 16f0be33a4 I'm halfway through the HTML spec. 2018-11-12 23:20:15 +00:00
Bodil Stokke 73344d0dbf Build a virtual DOM structure. 2018-11-12 16:29:48 +00:00
Bodil Stokke 2806bde178 Such work. 2018-10-28 00:48:34 +01:00
Bodil Stokke 858b16cf34 Drop the bad Rust 2018 Cargo forces on you. Rewrite to work with actual native proc_macros. 2018-10-27 19:49:52 +01:00
Bodil Stokke f7ce896ca3 Autobox everything. 2018-10-27 17:28:57 +01:00
Bodil Stokke dee331c5eb Cleanup, reorg, data attributes. 2018-10-27 17:00:43 +01:00
Bodil Stokke 4f8b4e2b20 The nastiest element declaration macro. 2018-10-27 03:11:00 +01:00
Bodil Stokke 3bc444068c Make it so. 2018-10-26 22:02:21 +01:00