update(attributes)

Updates attributes of a Widget instance.

Copy
widget = new (Scrivito.getClass("TextWidget"))({text: 'Hello World'});
page = Scrivito.getClass("Page").create({body: [widget]});
widget.update({text: "How are you?"});
page.get("body")[0].get("text");
// => "How are you?"

Params

  • attributes (Object) - The attributes to update.