Sync with Etiquette.
This commit is contained in:
		
							parent
							
								
									5252617111
								
							
						
					
					
						commit
						4bf27d4458
					
				
					 2 changed files with 13 additions and 1 deletions
				
			
		|  | @ -40,7 +40,7 @@ body | ||||||
|         "content_body" 1fr |         "content_body" 1fr | ||||||
|         /1fr; |         /1fr; | ||||||
| 
 | 
 | ||||||
|     height: 100%; |     min-height: 100%; | ||||||
|     margin: 0; |     margin: 0; | ||||||
| 
 | 
 | ||||||
|     background-color: var(--color_primary); |     background-color: var(--color_primary); | ||||||
|  |  | ||||||
|  | @ -76,6 +76,12 @@ function _request(method, url, callback) | ||||||
|         } |         } | ||||||
|         "data": {JSON parsed from server response if json_ok}. |         "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 request = new XMLHttpRequest(); | ||||||
|     const response = { |     const response = { | ||||||
|  | @ -159,6 +165,12 @@ function html_to_element(html) | ||||||
|     return template.content.firstElementChild; |     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 /////////////////////////////////////////////////////////////////////////////////
 | // HOOKS & ADD-ONS /////////////////////////////////////////////////////////////////////////////////
 | ||||||
| ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue