API for wrapping a javascript UI library

I’m thinking about wrapping a UI library (most probably w2ui), and I have a general design question:

Would you – as a developer using such a library – prefer to work with a Xojo-like API or the API of the javascript library?

Here are a few examples from the w2ui grid component:

[code]w2ui: property buttons = { reload’ : { type : ‘button’, id : ‘reload’, img : ‘icon-reload’ }, …
Xojo à la w2ui: Property Buttons() As GridButtons // GridButton being a class with Type, Id, and Img props
Xojo à la Xojo: Property ButtonType(index As Integer) As Grid.ButtonTypes // Grid.ButtonTypes is an enum
Property ButtonId(index As Integer) As String
Property ButtonImage(index As Integer) As String

w2ui: method addColumn([before], column)
Xojo à la w2ui: Sub AddColumn(column As GridColumn, Optional beforeIndex As Integer) // GridColumn class
Xojo à la Xojo: Property ColumnCount As Boolean
Property Heading(index As Integer, Assigns text As String)

w2ui: event onClick(e)
Xojo à la w2ui: Event OnClick(e As w2uiEvent) // w2uiEvent is a wrapper class for the javascript event
Xojo à la w2ui: Event CellClick(row As Integer, column As Integer, x As Integer, y As Integer) As Boolean[/code]

[quote=243427:@Lukas Joerg]I’m thinking about wrapping a UI library (most probably w2ui), and I have a general design question:

Would you – as a developer using such a library – prefer to work with a Xojo-like API or the API of the javascript library?
[/quote]

I am fluent enough in JavaScript to have no issue with using the JavaScript syntax, but I strongly feel a lot of Xojo developers will feel a whole lot more comfortable using the Xojo syntax.

That said, it is superb idea. Good luck :slight_smile: