4 <title>Media Queries Test inner frame
</title>
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
6 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
14 <style type=
"text/css" id=
"style" media=
"all and (display-mode: browser)">
15 body { background: yellow; }
17 <style type=
"text/css" id=
"style" media=
"all and (display-mode: standalone)">
18 body { background: green; }
20 <style type=
"text/css" id=
"style" media=
"all and (display-mode: minimal-ui)">
21 body { background: red; }
23 <style type=
"text/css" id=
"style" media=
"all and (display-mode: fullscreen)">
24 body { background: blue; }
29 window
.addEventListener("message", e
=> {
30 if (e
.data
== "get-background-color") {
31 let { backgroundColor
} = document
.defaultView
.getComputedStyle(document
.body
);
32 e
.source
.postMessage({ backgroundColor
}, e
.origin
);