Sub AppStart (Form1 As Form, Args() As String)
'initialize banano object with event, appname (must not have space) and version
BANano.Initialize("BANano", "MyApp",DateTime.now)
'the name of the html file
BANano.HTML_NAME = "index.html"
'the title of the page
BANano.Header.Title = "MyApp"
'do not use service workers for PWA
BANano.TranspilerOptions.UseServiceWorker = False
'transpile b4j code to html, css and javascript and store output in File.DirApp
'the webiste/website will be loaded in \Objects\MyApp where you saved your project
BANano.Build(File.dirApp)
'open the compiled index file
Dim URL As String = File.GetUri(File.Combine(File.dirapp,"MyApp"),"index.html")
fx.ShowExternalDocument(URL)
ExitApplication
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub BANano_Ready
'****javascript****
'var body = document.getElementById("body");
'var.innerHTML = 'Hello Alain Bailleul!';
'****jquery****
'var body = $("#body");
'body.append("Hello Alain Bailleul!");
'****banano****
Dim body As BANanoElement = BANano.GetElement("#body")
body.Append("Hello Alain Bailleul!")
End Sub