This could be a method to retrieve such a attribute, BUT it is probably a huge overkill in this case and you should use the existing Vue API:
It does however show the power of BANano and why you could actually write a complete Vue framework alternative right in B4J! ?
B4X:
public Sub GetAttribute(element As BANanoElement, attrName As String) As String
Dim DOMParser As BANanoObject
DOMParser.Initialize2("DOMParser", Null)
Dim parents() As BANanoElement = element.Parent("")
Dim obj As BANanoObject = DOMParser.RunMethod("parseFromString", Array(parents(0).GetHTML,"text/html")).Result
Return obj.RunMethod("getElementById",element.Name).GetField("attributes").GetField(attrName).GetField("nodeValue").Result
End Sub
Using @
Currently I am using the 'v-on' directive to bypass the @ shortcut for such. Besides this I have seen a lof of stuff on the lastest Angular almost starting with @ etc. Confusing.
Using #
before, using ...
B4X:
<slot name="header"></slot>
was perfectly acceptable in Vue2, Vue3 expects
B4X:
<template #header"></template>
I have recently find out that I can instead write it as "v-slot:header" and BANano accepts it in the small tests I have done so far due to how <template> is "compiled". I am using the full power of BANano to build my HTML trees based on conditions chosen in the abstract designer and then I get these with GetHTML and then feed to the "template" key of my component options. I was avoiding using a stringBuilder for this because BANano is capable.
Pity I cant reproduce the error messages at the moment, I don't recall what I did.