Sync with Etiquette.

master
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 /////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////