-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrokerize-main.html
More file actions
66 lines (59 loc) · 2.08 KB
/
brokerize-main.html
File metadata and controls
66 lines (59 loc) · 2.08 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html>
<body>
<h1>some general remarks</h1>
<style nonce="abc123">
#big-buy-button {
display: none;
background-color: rgb(0, 255, 0);
font-size: 1.5em;
}
.brokerize-viewport {
padding: 2em;
margin: 2em;
max-width: 70%;
}
.brokerize-viewport ul:not(.no-list) {
list-style: disc;
}
html zl-module * {
all: initial !important;
}
</style>
<ul>
<li>
this file demonstrates a plain JavaScript way of using the
BrokerizeMain element, which encapsulates the behavior needed in
most trading applications (i.e. broker login, portfolio
overview, order forms etc).
</li>
<li>just <i>view-source</i> to see how it works</li>
<li>
<a
href="#"
onclick="sessionStorage.removeItem('brokerize');location.reload();"
>click here to reset localStorage</a
>
(discards credentials)
</li>
<li>
<a href="#" onclick="showMain()"><code>showMain</code></a>
(when logged in)
</li>
<li>
<a href="#" onclick="startExampleOrderFlow()"
><code>startExampleOrderFlow buy apple limit 15</code></a
>
(when logged in)
</li>
</ul>
<h1>the <code>renderTo</code> element</h1>
<div id="content" class="brokerize-viewport"></div>
<button id="big-buy-button" onclick="buy()">
click this button to buy in current portfolio
</button>
<div id="brokerize-modal-portal"></div>
<script src="node_modules/@brokerize/elements/dist/bundle.umd.js"></script>
<script src="./config.js"></script>
<script src="./brokerize-main.js"></script>
</body>
</html>