Skip to content

Commit

Permalink
node manager mount html attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxence-charriere committed Oct 2, 2023
1 parent 9d240d4 commit eb59447
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkg/app/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ func (m *nodeManager) mountHTML(depth uint, v HTML) (UI, error) {
Wrap(err)
}
v.setJSElement(jsElement)
v.attrs().Mount(jsElement, m.ResolveURL) // To be reworked
v.events().Mount(v) // To be reworked
m.mountHTMLAttributes(jsElement, v.attrs())
v.events().Mount(v) // To be reworked

v.setDepth(depth)
children := v.body()
Expand All @@ -236,7 +236,13 @@ func (m *nodeManager) mountHTML(depth uint, v HTML) (UI, error) {
}

func (m *nodeManager) mountHTMLAttributes(jsElement Value, attrs attributes) {
panic("to implement")
for name, value := range attrs {
setJSAttribute(jsElement, name, resolveAttributeURLValue(
name,
value,
m.ResolveURL,
))
}
}

func (m *nodeManager) mountComponent(depth uint, v Composer) (UI, error) {
Expand Down

0 comments on commit eb59447

Please sign in to comment.