Sync with Etiquette.

This commit is contained in:
voussoir 2021-01-02 16:54:20 -08:00
parent 5252617111
commit 4bf27d4458
2 changed files with 13 additions and 1 deletions

View file

@ -40,7 +40,7 @@ body
"content_body" 1fr
/1fr;
height: 100%;
min-height: 100%;
margin: 0;
background-color: var(--color_primary);

View file

@ -76,6 +76,12 @@ function _request(method, url, callback)
}
"data": {JSON parsed from server response if json_ok}.
}
So, from most lenient to most strict, error catching might look like:
if response.meta.completed
if response.meta.json_ok
if response.meta.status === 200
if response.meta.status === 200 and response.meta.json_ok
*/
const request = new XMLHttpRequest();
const response = {
@ -159,6 +165,12 @@ function html_to_element(html)
return template.content.firstElementChild;
}
common.size_iframe_to_content =
function size_iframe_to_content(iframe)
{
iframe.style.height = iframe.contentWindow.document.documentElement.scrollHeight + 'px';
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// HOOKS & ADD-ONS /////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////