window.onload = async function()
{
const Song = Backbone.Model.extend({
defaults:{
"name": "I love you"
}
})
const Songs = Backbone.Collection.extend({
model: Song
});
const AppView = Backbone.View.extend({
el: $("#content"),
initialize: function()
{
this.$el.html("<b>"+this.model.get("name")+"</b>");
}
});
var first = new Song();
let r = await test();
let song = new Song(r);
const appView = new AppView({model: song});