Skip to content

document canvas field on window in wasm#4683

Closed
mockersf wants to merge 1 commit intobevyengine:mainfrom
mockersf:doc-platform-specific
Closed

document canvas field on window in wasm#4683
mockersf wants to merge 1 commit intobevyengine:mainfrom
mockersf:doc-platform-specific

Conversation

@mockersf
Copy link
Member

@mockersf mockersf commented May 6, 2022

Objective

  • It's very hard to discover the canvas field to use an existing canvas in wasm. Improve it

Solution

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label May 6, 2022
@mockersf mockersf added C-Docs An addition or correction to our documentation O-Web Specific to web (WASM) builds and removed S-Needs-Triage This issue needs to be labelled labels May 6, 2022
pub transparent: bool,
#[cfg(target_arch = "wasm32")]
/// This field is only available in wasm. Can take a CSS selector to an HTML canvas
#[cfg(any(target_arch = "wasm32", doc))]
Copy link
Contributor

@bjorn3 bjorn3 May 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use #[doc(cfg(target_arch = "wasm32"))] too? That shows the cfg as part of the documentation. I'm not sure if it is stable already, but if not you could gate it to docs.rs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mockersf
Copy link
Member Author

closed in favour of #4726 which remove the wasm32 limit on the field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Docs An addition or correction to our documentation O-Web Specific to web (WASM) builds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants