* enable interning
* intern tag names
* intern attribute keys and event listener types
* intern attribute values
* cache and clone elements
* clean up the node cloning version a bit
* use HashMap instead of Vec for element cache
* Revert "intern attribute values"
This reverts commit 28653c4660dcf1942fab3b0ad7d4c840b96e0f2a.
* add `enable-interning` feature to Yew that activates the same in wasm-bindgen
* remove interning feature
use instead of NodeRef, decoupling the two
fixes#3043
* implement internal DomSlot
* move DomSlot into submodule of dom_bundle
* hide behind feature csr
* add test cases
* write get in continuation style, this saves a clone
* private DomSlot::get
* Fixing https://github.com/yewstack/yew/issues/2911
Prevents Link onclick behaviour from executing if the Ctrl key (for
Windows and Linux) or Meta Key (For Mac) is pressed.
This technically introduces a bug that means that links will reload the
page on windows machines when the windows key is held down. However,
this error is also in React Router, so I think we can get away with it.
See:
11156ac7f3/packages/react-router-dom/dom.ts (L29)
* Router Links now use default browser behaviour for alt and shift keys.
This change is inspired by 11156ac7f3/packages/react-router-dom/dom.ts (L29)
This allows uses to shift click links to save whatever the link points
at, and alt click on links to open them in new windows
* assert there are no circular references
the check is costly in release builds and should always fail
note that the current PartialEq impl is *not* symmetric!
should be fixed as well, with an improved design
* remove internal test for cyclic node refs
wasm_bindgen does not yet support #[should_panic]
see also https://github.com/rustwasm/wasm-bindgen/issues/2286
* Use AttrValue instead of Cow in Classes
* Wrap indexset into Rc
* Impl ImplicitClone for Classes
* clippy
* Trigger CI
* Update macro stderr
* Copy optimization made for String to AttrValue
* Update macro stderr again
* Add VNode::html_from_raw
* Add docs for VNode::html_from_raw
* feature lock to available flags
* Actually raw
* Formatting + docs
* Tests
* More tests + docs
* fmt
* clippy
* CI
* No <div> around multi top-level nodes
* Update docs
* Fix braw detach
* Clippy & fmt
* Fix compile errors
* I hope you get attacked by Cow, Clippy
* Address review
* Reduce DOM calls
* improve detach bundle impl
* Add more tests
* Update example
* fmt
* Apply review suggestions
* fmt
* fix ci
* fix braw shift with multiple nodes
* rename function name
* fmt
* this should've been there
* ci be green
The following main.rs replicates the clippy warning:
```
use yew::prelude::*;
struct Props {
droppable: Vec<()>,
}
fn component(props: &Props) -> Html {
let props = Props { droppable: Vec::new() };
html! { <Component ..props /> }
}
fn main() {}
```
If I'm not mistaken this happens when using the `..` on any `Properties` with a field that implements `Drop`.
* Replace unwrap with if let to prevent panic
* Add resume after unmount test
* Change BaseSuspense methods to associated functions
* Fix rustfmt issues
* fix portal shifting on reconciliation too often
the public vdom api changes to only allow directly
setting a Node as sibling (still optional) instead of a NodeRef.
This was the intention all along, since the NodeRef was
not dynamically tracked, and creating a portal into a subtree
already controlled by yew is not supported anway.
* fix feature soundness
* fix doc tests