Remove invalid global data attribute (#4270)
* Remove invalid global data attribute Removes the non-existent global 'data' attribute from HTML global attributes that was referencing broken MDN documentation. HTML specification only supports data-* custom attributes and the <data> element, not a global 'data' attribute. Fixes #4241 * fix other attributes using datas --------- Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
76ffcabd0b
commit
097bc1d1c8
3 files changed
+5
-3
No files matched your search
@@ -99,7 +99,7 @@ fn SpinningCube(color: Memo<Color>) -> Element {
|
|||||||
div { id:"canvas-container",
|
div { id:"canvas-container",
|
||||||
canvas {
|
canvas {
|
||||||
id: "demo-canvas",
|
id: "demo-canvas",
|
||||||
data: paint_source_id
|
"data": paint_source_id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ pub struct MetaProps {
|
|||||||
pub charset: Option<String>,
|
pub charset: Option<String>,
|
||||||
pub http_equiv: Option<String>,
|
pub http_equiv: Option<String>,
|
||||||
pub content: Option<String>,
|
pub content: Option<String>,
|
||||||
|
pub data: Option<String>,
|
||||||
#[props(extends = meta, extends = GlobalAttributes)]
|
#[props(extends = meta, extends = GlobalAttributes)]
|
||||||
pub additional_attributes: Vec<Attribute>,
|
pub additional_attributes: Vec<Attribute>,
|
||||||
}
|
}
|
||||||
@@ -35,6 +36,9 @@ impl MetaProps {
|
|||||||
if let Some(content) = &self.content {
|
if let Some(content) = &self.content {
|
||||||
attributes.push(("content", content.clone()));
|
attributes.push(("content", content.clone()));
|
||||||
}
|
}
|
||||||
|
if let Some(data) = &self.data {
|
||||||
|
attributes.push(("data", data.clone()));
|
||||||
|
}
|
||||||
attributes
|
attributes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,8 +279,6 @@ mod_methods! {
|
|||||||
/// <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable>
|
/// <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable>
|
||||||
contenteditable;
|
contenteditable;
|
||||||
|
|
||||||
/// <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data>
|
|
||||||
data;
|
|
||||||
|
|
||||||
/// <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir>
|
/// <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir>
|
||||||
dir;
|
dir;
|
||||||
|
|||||||
Reference in new issue
Block a user