DNA transcription and translation in wasm with rust
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
417 B

  1. import * as wasm from "wasm-dna-transcription-translation";
  2. const urlParams = new URLSearchParams(window.location.search);
  3. const strand = urlParams.get('strand');
  4. try {
  5. wasm.main(strand);
  6. } catch(err) {
  7. alert('Oh no! Something went wrong. Please check that your DNA strand only uses valid characters, and has a stop & start codon. You will now be redirected to the homepage.')
  8. window.location.href = '/';
  9. }