window.getScreenWidth = () => {
    return window.innerWidth;
};

window.registerResizeCallback = (dotNetHelper) => {
    window.onresize = () => {
        dotNetHelper.invokeMethodAsync('UpdateScreenWidth', window.innerWidth);
    };
};