Currently, our definition of width uses the clientWidth of the <body> element.
But when you embed a cell from a notebook, you often want to place it into an existing layout — one that is not iframed. This makes our width variable a trap: If you use it, you'll have to remove it, or know how to redefine it using the Runtime’s API, when you decide to embed.
Should we either:
Provide an additional alternative stdlib variable to width, one that reports the computed width of the closest positioned parent element?
Change the definition of width to return the parent’s width instead of the page’s? (And would this require standard library versioning to ship?)
Currently, our definition of
width
uses theclientWidth
of the<body>
element.But when you embed a cell from a notebook, you often want to place it into an existing layout — one that is not iframed. This makes our
width
variable a trap: If you use it, you'll have to remove it, or know how to redefine it using the Runtime’s API, when you decide to embed.Should we either:
width
, one that reports the computed width of the closest positioned parent element?width
to return the parent’s width instead of the page’s? (And would this require standard library versioning to ship?)