File tree 4 files changed +21
-1
lines changed
4 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 2
2
{{{ card }}}
3
3
4
4
{{> webauthn_setup nodes =nodes webAuthnHandler =webAuthnHandler webauthnTriggerName =" webauthn_login_trigger" }}
5
+ {{> js_setup nodes =nodes }}
5
6
{{ #if extraPartial }}
6
7
{{> (extraPartial ) }}
7
8
{{ /if }}
Original file line number Diff line number Diff line change
1
+ {{! This partial sets up the onclick and onload event handlers for each passkey node.}}
2
+ <script type =" text/javascript" >
3
+ // register onclick and onload event handlers for each passkey node.
4
+ window .addEventListener (" load" , () => {
5
+ {{#each (onlyNodes nodes " passkey" " " )}}
6
+ {{#if attributes .onclick }}
7
+ // onclick for {{attributes.name}}
8
+ document .getElementsByName (" {{attributes.name}}" ).forEach ((el ) => {
9
+ el .addEventListener (" click" , () => { {{{attributes .onclick }}} })
10
+ })
11
+ {{/ if }}
12
+ {{#if attributes .onload }}
13
+ // onload for {{attributes.name}}
14
+ {{{attributes .onload }}}
15
+ {{/ if }}
16
+ {{/ each}}
17
+ })
18
+ </script >
Original file line number Diff line number Diff line change 3
3
{{{ card }}}
4
4
5
5
{{> webauthn_setup nodes =nodes webAuthnHandler =webAuthnHandler webauthnTriggerName =" webauthn_register_trigger" }}
6
+ {{> js_setup nodes =nodes }}
6
7
{{ #if extraPartial }}
7
8
{{> (extraPartial ) }}
8
9
{{ /if }}
Original file line number Diff line number Diff line change 5
5
</div >
6
6
7
7
{{> webauthn_setup nodes =nodes webAuthnHandler =webAuthnHandler webauthnTriggerName =" webauthn_register_trigger" }}
8
-
8
+ {{> js_setup nodes = nodes }}
9
9
</div >
You can’t perform that action at this time.
0 commit comments