webcomponents.rs 676 B

123456789101112131415161718192021
  1. //! Example: Web Components
  2. //! -----------------------
  3. //!
  4. //! Web components are a flavor of html elements that can be user-defined.
  5. //! See: https://www.webcomponents.org for more information.
  6. //!
  7. //! Users who use webcomponents typically don't use Dioxus. However, if you would like to use webcomponents in Dioxus,
  8. //! you can easily create a new custom element with compile-time correct wrappers around the webcomponent.
  9. //!
  10. //! We don't support building new webcomponents with Dioxus, however.
  11. //!
  12. use dioxus::{builder::ElementBuilder, prelude::NodeFactory};
  13. fn main() {}
  14. // TODO
  15. struct MyEle<'a, 'b> {
  16. el: ElementBuilder<'a, 'b>,
  17. fac: &'b NodeFactory<'a>,
  18. }