ifrau
Version:
Free-range app utility for IFRAME-based FRAs
14 lines (12 loc) • 414 B
JavaScript
export function hostSyncFont(host) {
host.onRequest('font', () => {
const bodyComputedStyle = window.getComputedStyle(document.body);
const rootComputedStyle = window.getComputedStyle(document.documentElement);
const visualRedesign = document.body.classList.contains('visual-redesign');
return {
family: bodyComputedStyle.fontFamily,
size: rootComputedStyle.fontSize,
visualRedesign
};
});
}