Breaking change: removing some public things which no longer need to be public
This commit is contained in:
parent
8a056e9eec
commit
ae65e7db23
12
src/dom.rs
12
src/dom.rs
|
@ -73,8 +73,8 @@ impl<A, B, C> RefFn<A, B, C> where B: ?Sized, C: Fn(&A) -> &B {
|
|||
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS#Valid%20Namespace%20URIs
|
||||
pub const HTML_NAMESPACE: &str = "http://www.w3.org/1999/xhtml";
|
||||
pub const SVG_NAMESPACE: &str = "http://www.w3.org/2000/svg";
|
||||
const HTML_NAMESPACE: &str = "http://www.w3.org/1999/xhtml";
|
||||
const SVG_NAMESPACE: &str = "http://www.w3.org/2000/svg";
|
||||
|
||||
// 32-bit signed int
|
||||
pub const HIGHEST_ZINDEX: &str = "2147483647";
|
||||
|
@ -258,12 +258,12 @@ impl Dom {
|
|||
|
||||
|
||||
#[inline]
|
||||
pub fn create_element<A>(name: &str) -> A where A: JsCast {
|
||||
fn create_element<A>(name: &str) -> A where A: JsCast {
|
||||
bindings::create_element(intern(name)).dyn_into().unwrap_throw()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn create_element_ns<A>(name: &str, namespace: &str) -> A where A: JsCast {
|
||||
fn create_element_ns<A>(name: &str, namespace: &str) -> A where A: JsCast {
|
||||
bindings::create_element_ns(intern(namespace), intern(name)).dyn_into().unwrap_throw()
|
||||
}
|
||||
|
||||
|
@ -1089,6 +1089,10 @@ pub mod __internal {
|
|||
use crate::traits::MultiStr;
|
||||
|
||||
|
||||
pub use web_sys::HtmlElement;
|
||||
pub use web_sys::SvgElement;
|
||||
|
||||
|
||||
pub fn make_class_id() -> String {
|
||||
// TODO replace this with a global counter in JavaScript ?
|
||||
// TODO can this be made more efficient ?
|
||||
|
|
|
@ -16,6 +16,3 @@ pub mod traits;
|
|||
pub mod animation;
|
||||
pub mod routing;
|
||||
pub mod events;
|
||||
|
||||
pub use web_sys::HtmlElement;
|
||||
pub use web_sys::SvgElement;
|
||||
|
|
|
@ -47,7 +47,7 @@ macro_rules! with_node {
|
|||
#[macro_export]
|
||||
macro_rules! html {
|
||||
($($args:tt)+) => {
|
||||
$crate::__internal_builder!($crate::HtmlElement, new_html, $($args)+)
|
||||
$crate::__internal_builder!($crate::__internal::HtmlElement, new_html, $($args)+)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ macro_rules! html {
|
|||
#[macro_export]
|
||||
macro_rules! svg {
|
||||
($($args:tt)+) => {
|
||||
$crate::__internal_builder!($crate::SvgElement, new_svg, $($args)+)
|
||||
$crate::__internal_builder!($crate::__internal::SvgElement, new_svg, $($args)+)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue