-
Notifications
You must be signed in to change notification settings - Fork 1
/
wc.html
38 lines (37 loc) · 1.51 KB
/
wc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>NFDI4Chem: Ontology Elements</title>
</head>
<body>
<h1>Ontology - Web Components</h1>
<h3>Ontology - Annotation</h3>
<pre>Macrobrachium nipponense NCBITAXON http://purl.obolibrary.org/obo/NCBITaxon_159736</pre>
<ontology-annotation
annotation="Macrobrachium nipponense NCBITAXON http://purl.obolibrary.org/obo/NCBITaxon_159736"></ontology-annotation>
<br/><br/>
<h3>Ontology - Autocomplete</h3>
<ontology-autocomplete
format="text"
id="ontologyInput"
label="Input field (ontology driven)"
info="Search terms across ontologies. Example: Homo sapiens, obi:Homo sapiens"
value="hello"
placeholder="search term"
/></ontology-autocomplete><br/>
<code><pre id="output"></pre></code>
<script type="module">
import { OntologyAutoComplete, OntologyAnnotation, register } from './dist/index.js'
register()
let ontoInput = document.getElementById("ontologyInput")
ontoInput.addEventListener('change', saveValue);
function saveValue(e){
document.getElementById('output').innerHTML = ""
ontoInput.setAttribute('value', e.detail[0])
document.getElementById('output').innerHTML = document.getElementById('ontologyInput').getAttribute('value')
}
</script>
</body>
</html>