Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split run_wasm_with_css internals into public builder #40

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cargo-run-wasm = "0.3.0"

```rust
fn main() {
cargo_run_wasm::run_wasm_with_css("body { margin: 0px; }");
cargo_run_wasm::run_wasm_cli_with_css("body { margin: 0px; }");
}
```

Expand Down Expand Up @@ -82,7 +82,7 @@ cargo-run-wasm is not available as a [cargo custom command](https://doc.rust-lan

## Configuration

If you wish to set custom css, do so in the string argument to `run_wasm_with_css`.
If you wish to set custom css, do so in the string argument to `run_wasm_cli_with_css`.

However it is not possible to set custom html from cargo-run-wasm, instead any DOM elements you require should be created from within your crate or example using [web-sys](https://docs.rs/web-sys/latest/web_sys/struct.Document.html#method.create_element) or another crate.
The reasoning is that in the case an example requires custom HTML it will probably:
Expand Down
Loading
Loading