update wfa.js,
reduce clobbering of global namespaces
This commit is contained in:
10
index.html
10
index.html
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="dist/wfa.js" type="module"></script>
|
||||
<script src="wfa.js" type="module"></script>
|
||||
<script type="module">
|
||||
import wfaInit from "./dist/wfa.js";
|
||||
import wfaInit from "./wfa.js";
|
||||
wfaInit("dist/wfa.wasm");
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
wfaInit("dist/wfa.wasm");
|
||||
document.querySelector("#submit").addEventListener("click", () => {
|
||||
a = document.querySelector("#a").value
|
||||
b = document.querySelector("#b").value
|
||||
@@ -15,8 +15,8 @@
|
||||
o: 0,
|
||||
e: 1
|
||||
};
|
||||
const { score, CIGAR } = global.wfAlign(a, b, penalties, true);
|
||||
const alignment = global.DecodeCIGAR(CIGAR);
|
||||
const { score, CIGAR } = global.wfa.wfAlign(a, b, penalties, true);
|
||||
const alignment = global.wfa.DecodeCIGAR(CIGAR);
|
||||
document.querySelector("#result").innerText = `${score}, ${CIGAR}, ${alignment}`;
|
||||
})
|
||||
});
|
||||
|
Reference in New Issue
Block a user