Platform
Resources
Pricing
Sign in
Get started
Josh
A nice dude
Workspace
Fork
Published
Utilities
By
Josh
Edited
Jun 29, 2022
Importers
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
mutable
innerHeight
=
observeWindowProperty
(
"innerHeight"
)
Insert cell
mutable
outerHeight
=
observeWindowProperty
(
"outerHeight"
)
Insert cell
mutable
innerWidth
=
observeWindowProperty
(
"innerWidth"
)
Insert cell
mutable
outerWidth
=
observeWindowProperty
(
"outerWidth"
)
Insert cell
observeWindowProperty
=
_
.
curry
(
observeProperty
)
(
window
)
Insert cell
observeProperty
=
(
object
,
property
)
=>
Generators
.
observe
(
(
notify
)
=>
{
let
temp
;
const
interval
=
setInterval
(
(
)
=>
{
if
(
temp
!==
object
[
property
]
)
notify
(
(
temp
=
object
[
property
]
)
)
;
}
)
;
return
(
)
=>
clearInterval
(
interval
)
;
}
)
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
innerHeight
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
outerHeight
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
innerWidth
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
outerWidth
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
observeWindowProperty
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
observeProperty
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML