feat: enable innerWidth and innerHeight for window open (#47038)
feat: enable innerWidth and innerHeight for window open (#46749) * feat: enable innerWidth and innerHeight for window open * update comment for added special innerWidth and innerHeight * update 100 min spec requirement handling * update testing to include getContentSize * update macOS min requirement handling * adjust refactored consts * update const values from nativewindowviews Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
This commit is contained in:
parent
8b2b155c5d
commit
6a0e31633a
6 changed files with 87 additions and 8 deletions
|
@ -26,7 +26,12 @@ const keysOfTypeNumberCompileTimeCheck: { [K in IntegerBrowserWindowOptionKeys]
|
|||
};
|
||||
// Note `top` / `left` are special cases from the browser which we later convert
|
||||
// to y / x.
|
||||
const keysOfTypeNumber = new Set(['top', 'left', ...Object.keys(keysOfTypeNumberCompileTimeCheck)]);
|
||||
// NOTE(@mlaurencin) `innerWidth` / `innerHeight` are also special cases. The spec
|
||||
// states that `width` and `height` represent the window content size and are equivalent
|
||||
// to `innerWidth` / `innerHeight`. However, our implementation currently incorrectly maps
|
||||
// `width` and `height` to `outerWidth` and `outerHeight`, or the size of the window
|
||||
// with all border and related window chrome.
|
||||
const keysOfTypeNumber = new Set(['top', 'left', 'innerWidth', 'innerHeight', ...Object.keys(keysOfTypeNumberCompileTimeCheck)]);
|
||||
|
||||
/**
|
||||
* Note that we only allow "0" and "1" boolean conversion when the type is known
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue