@sysdoc/sharepoint-utils
Version:
Sysdoc's core Sharepoint utilities
19 lines (18 loc) • 531 B
JavaScript
;
/*!
* Copyright Sysdoc @ 2019
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getListParentWebUrl = void 0;
function getListParentWebUrl(ctx, list) {
return new Promise(function (res, rej) {
var web = list.get_parentWeb();
ctx.load(web);
ctx.executeQueryAsync(function () {
res(web.get_serverRelativeUrl());
}, function () {
return null;
});
});
}
exports.getListParentWebUrl = getListParentWebUrl;