110 — how to write to the DOM
document.createTextNode('...')
document.createElement("div")
function appendHtml(el, str) {
var div = document.createElement('div');
div.innerHTML = str;
while (div.children.length > 0) {
el.appendChild(div.children[0]);
}
}
var html = '<h1 id="title">Some Title</h1>
<span style="display:inline-block; width=100px;">Some arbitrary text</span>';
appendHtml(document.body, html); // "body" has two more children - h1 and span.
document.body.insertAdjacentHTML("beforeend", theHTMLToInsert);
Here we add elements:
<div id="div-1" style="text-align:left;">
</div>
Some links:
→ docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/
Passing a Request to a Proxied Server
- Passing Request Headers
- Configuring Buffers
- Choosing an Outgoing IP Address