Skip to content

Commit

Permalink
feat: Template.HTML.CustomElement - Supporting -EventHandlers ( Fixes #…
Browse files Browse the repository at this point in the history
…973 )

Correcting target element ID
  • Loading branch information
James Brundage committed Mar 25, 2024
1 parent d7d68cb commit 2fa9fbd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Template function HTML.CustomElement {
if ($prop.Name -notmatch '\.') { continue }
$propNameSegements = $prop.Name -split '\.'
if ($propNameSegements.Count -lt 2) { continue }
$elementId = $propNameSegements[0..($propNameSegements.Count - 1)] -join '.'
$elementId = $propNameSegements[0..($propNameSegements.Count - 2)] -join '.'
$eventNames = $propNameSegements[-1] -split '\s{0,},\s{0,}'
$eventHandlerScript = $prop.Value
if ($eventHandlerScript -notmatch 'function') {
Expand Down

0 comments on commit 2fa9fbd

Please sign in to comment.