MCPcopy Create free account
hub / github.com/controlsjs/controls.js / ng_WindowWidth

Function ng_WindowWidth

src/ng_basic/basic.js:1227–1235  ·  view source on GitHub ↗

* Function: ng_WindowWidth * Returns window width. * * Syntax: * int *ng_WindowWidth* () * * Returns: * Width of browser's window.

()

Source from the content-addressed store, hash-verified

1225 * Width of browser's window.
1226 */
1227function ng_WindowWidth()
1228{
1229 var width=0;
1230 if(typeof(window.innerWidth)=='number') {width=window.innerWidth;}
1231 else if(document.documentElement&&document.documentElement.clientWidth) {width=document.documentElement.clientWidth;}
1232 else if(document.body&&document.body.clientWidth) {width=document.body.clientWidth;}
1233 if(!width) width=100;
1234 return width;
1235}
1236
1237/**
1238 * Function: ng_WindowHeight

Callers 15

Create_weMessageDlgFunction · 0.85
Create_dlgAboutFunction · 0.85
ngmn_WindowWidthFunction · 0.85
ngmn_GetScreenRectFunction · 0.85
ng_AlignFunction · 0.85
nge_DropDownFunction · 0.85
ngw_CenterFunction · 0.85
ngw_CalcAutoSizeFunction · 0.85
ngw_CheckBoundsFunction · 0.85
ngw_DoPtrDragFunction · 0.85
ngw_DoPtrEndFunction · 0.85
ngh_FindAnchorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected