in src/report.ts [406:429]
async getActivePage(): Promise<Page> {
if (isRDLEmbed(this.config.embedUrl)) {
return Promise.reject(APINotSupportedForRDLError);
}
try {
const response = await this.service.hpm.get<IPage[]>('/report/pages', { uid: this.config.uniqueId }, this.iframe.contentWindow);
const activePage = response.body.find((page: IPage) => page.isActive);
return new Page(
this,
activePage.name,
activePage.displayName,
activePage.isActive,
activePage.visibility,
activePage.defaultSize,
activePage.defaultDisplayOption,
activePage.mobileSize,
activePage.background,
activePage.wallpaper,
);
} catch (response) {
throw response.body;
}
}