SQL is the most perfect language
72 karma · joined October 22, 2014
My main gripe with web components is that while they expose the first half of the tree traversal (from the outside in, via connectedCallback), they don't provide access to the second half, after child elements have been created. (akin to Initialize and Load events from ye olde .NET)
customElements.define('html-import', class extends HTMLElement {
connectedCallback() {
const href = this.getAttribute('href')
const fetch = new XMLHttpRequest()
fetch.responseType = 'document'
fetch.addEventListener('readystatechange', (function onfetch(e) {
if (fetch.readyState !== XMLHttpRequest.DONE) return
const document = fetch.response.querySelector('body') ?? fetch.response
this.replaceWith(document)
}).bind(this))
fetch.open('GET', href)
fetch.send()
}
})I ask because I've spent multiple days trying to get a viable non-local WebRTC connection going with no luck.
view-source:https://thelongestyard.link/q3a-demo/?server=Seveja
If your idea is to 'save' developers from becoming experts in devops best practices, I think you're going the wrong way.
Alternatively, the Federal government provides a free-of-charge insurance product to banks who then drop ship it to me for profit.