Project

General

Profile

Js and Cpp: Browser Viewport size

Added by Plug Gulp about 12 years ago

Hello,

I am learning how to use JavaScript data from within Wt CPP source code. I wrote a simple example to print browser viewport size when the test application loads or when the browser window is resized. The example is attached with this post. The test application prints the browser viewport size only once when the application is first loaded. The application fails to print the viewport size when the browser window is resized. Why is the test application not printing the viewport size when the browser is resized?

Thanks and regards,

~Plug

PS: Just out of curiosity, what is the best way to get the browser viewport size using Wt if the application is not using layout manager?

CMakeLists.txt (377 Bytes) CMakeLists.txt CMake Build Script
main.cpp (1.75 KB) main.cpp Source Code