More library loading problems

Using Javascript from SpiderBasic
Andy
Posts: 46
Joined: Sat Feb 15, 2020 5:19 pm
Location: Larnaca, Cyprus
Contact:

More library loading problems

Post by Andy »

This time, i am trying to load the Tuna library but i get a "Tuna is not defined error"

Code: Select all

! $("<script src='https://cdnjs.cloudflare.com/ajax/libs/tunajs/1.0.4/tuna-min.js'></script>").appendTo("head");

Procedure ButtonHandler()
  
  ! var context = new AudioContext()
  ! var tuna = new Tuna(context)
  
EndProcedure

OpenWindow(0, 0, 0, 1000, 1000, "Click test", #PB_Window_SystemMenu)
ButtonGadget(0, 10, 10, 180, 30, "Click me")
BindGadgetEvent(0, @ButtonHandler())