jsom-ctx
Version:
Simplifies JSOM usage, and allows for async-await
19 lines (16 loc) • 434 B
Markdown
Simplifies JSOM usage, and allows for async-await.
Get web title for current web
```typescript
(async function () {
try {
let ctx = new JsomContext(_spPageContextInfo.webAbsoluteUrl);
ctx = await ctx.load();
await ExecuteJsomQuery(ctx, [ctx.web, ctx.lists]);
console.log(ctx.web.get_title());
} catch (err) {
console.log(err);
}
})();
````