Skip to content

Commit

Permalink
Add a link to the MDN page for data attributes in the documentation f…
Browse files Browse the repository at this point in the history
…or `WebHandle` (#86)

Not all people reading the documentation will know what a data attribute is (I didn't), and may assume that this just means a regular attribute.
  • Loading branch information
Liamolucko authored Dec 21, 2021
1 parent 3a257f3 commit f27cb2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WebHandle {
/// An ID value inserted into the data attributes of the canvas element as '`raw-handle`'.
/// An ID value inserted into the [data attributes] of the canvas element as '`raw-handle`'.
///
/// When accessing from JS, the attribute will automatically be called `rawHandle`.
///
/// Each canvas created by the windowing system should be assigned their own unique ID.
/// 0 should be reserved for invalid / null IDs.
///
/// [data attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*
pub id: u32,
}

Expand Down

0 comments on commit f27cb2d

Please sign in to comment.