1
0

webcomponents.rs 866 B

1234567891011121314151617181920212223242526
  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. fn main() {}
  13. mod dioxus_elements {
  14. use dioxus::prelude::DioxusElement;
  15. struct custom_element;
  16. impl DioxusElement for custom_element {
  17. const TAG_NAME: &'static str = "custom_element";
  18. const NAME_SPACE: Option<&'static str> = None;
  19. }
  20. // Re-export the normal html namespace
  21. pub use dioxus::prelude::dioxus_elements::*;
  22. }