Skip to content

Commit

Permalink
minor bug fixes in wi-nd iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
YunPearce committed Sep 20, 2024
1 parent f42589c commit c028ad8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkg/arvo/neo/cod/std/src/fil/wi-nd.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,7 @@ customElements.define(
let el = document.createElement('iframe')
el.setAttribute('prefix', prefix)
el.setAttribute('lazy', '')
if (prefix === '/self') {
el.setAttribute('src', here)
} else {
el.setAttribute('src', prefix + here)
}
el.setAttribute('src', prefix + here)
el.setAttribute(
'style',
'width: 100%; flex-grow: 1; border: none; background: var(--b0);'
Expand All @@ -445,17 +441,17 @@ customElements.define(
return el
}
async rebuildIframe() {
$(this.gid('tabs')).children().remove()
let url =
this.renderer === '/self'
? window.location.origin + this.here
: window.location.origin + this.renderer + this.here
let isLoading = await this.checkUrl(url)
console.log('isLoading', isLoading, url)
if (isLoading) {
$(this.gid('tabs')).children().remove()
let frame = this.createIframe(this.renderer, this.here, true)
$(this.gid('tabs')).append(frame)
} else {
$(this.gid('tabs')).children().remove()
let frame = this.createIframe(`/tree`, this.here, true)
$(this.gid('menu-toggle')).text(`tree`)
$(this.gid('tabs')).append(frame)
Expand Down

0 comments on commit c028ad8

Please sign in to comment.