Versions

  • v11

    3/2/2024
    Open: Version
    Changes from v10 to v11
    +1
    -1
    ⦚ 16 unchanged lines ⦚
    $div.innerHTML = html
    $div.id = id
    document.getElementById(id).replaceWith($div)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
    ⦚ 16 unchanged lines ⦚
    $div.innerHTML = html
    $div.id = id
    document.getElementById(id).replaceWith(...$div.children)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
  • v10

    3/2/2024
    Open: Version
    Changes from v9 to v10
    +1
    -1
    ⦚ 16 unchanged lines ⦚
    $div.innerHTML = html
    $div.id = id
    document.getElementById(id).replaceWith(html)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
    ⦚ 16 unchanged lines ⦚
    $div.innerHTML = html
    $div.id = id
    document.getElementById(id).replaceWith($div)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
  • v9

    3/2/2024
    Open: Version
    Changes from v8 to v9
    +3
    -0
    ⦚ 13 unchanged lines ⦚
    .then(blob => blob.text())
    .then(html => {
    document.getElementById(id).replaceWith(html)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
    ⦚ 13 unchanged lines ⦚
    .then(blob => blob.text())
    .then(html => {
    const $div = document.createElement("div")
    $div.innerHTML = html
    $div.id = id
    document.getElementById(id).replaceWith(html)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
  • v8

    3/2/2024
    Open: Version
    Changes from v7 to v8
    +1
    -4
    ⦚ 13 unchanged lines ⦚
    .then(blob => blob.text())
    .then(html => {
    const $div = document.createElement("div")
    $div.innerHTML = html
    $div.id = id
    document.getElementById(id).replaceWith($div)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
    ⦚ 13 unchanged lines ⦚
    .then(blob => blob.text())
    .then(html => {
    document.getElementById(id).replaceWith(html)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
  • v7

    3/2/2024
    Open: Version
    Changes from v6 to v7
    +1
    -0
    import { html, RawHTML } from "https://esm.town/v/postpostscript/html";
    import { hybridTaggedTemplateMethodAsync } from "https://esm.town/v/postpostscript/hybridTaggedTemplateMethod";
    import { provideBlob } from "https://esm.town/v/postpostscript/provideBlob";

    export function provideBlobToHtml(jsPromise: RawHTML, placeholder?: unknown) {
    ⦚ 18 unchanged lines ⦚
    import { html, RawHTML } from "https://esm.town/v/postpostscript/html";
    import { hybridTaggedTemplateMethodAsync } from "https://esm.town/v/postpostscript/hybridTaggedTemplateMethod";
    import { provideBlob } from "https://esm.town/v/postpostscript/provideBlob";
    export { provideBlob } from "https://esm.town/v/postpostscript/provideBlob";

    export function provideBlobToHtml(jsPromise: RawHTML, placeholder?: unknown) {
    ⦚ 18 unchanged lines ⦚
  • v6

    2/29/2024
    Open: Version
    Changes from v5 to v6
    +1
    -1
    ⦚ 15 unchanged lines ⦚
    $div.innerHTML = html
    $div.id = id
    document.getElementById(id).replaceWith(id)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
    ⦚ 15 unchanged lines ⦚
    $div.innerHTML = html
    $div.id = id
    document.getElementById(id).replaceWith($div)
    })
    </script>
    ⦚ 3 unchanged lines ⦚
  • v5

    2/29/2024
    Open: Version
    Changes from v4 to v5
    +1
    -1
    ⦚ 11 unchanged lines ⦚
    ${jsPromise}
    .then(blob => blob.text())
    .then(text => {
    const $div = document.createElement("div")
    $div.innerHTML = html
    ⦚ 7 unchanged lines ⦚
    ⦚ 11 unchanged lines ⦚
    ${jsPromise}
    .then(blob => blob.text())
    .then(html => {
    const $div = document.createElement("div")
    $div.innerHTML = html
    ⦚ 7 unchanged lines ⦚
  • v4

    2/29/2024
    Open: Version
    Changes from v3 to v4
    +2
    -2
    import { html, RawHTML } from "https://esm.town/v/postpostscript/html";
    import { hybridTaggedTemplateMethodAsync } from "https://esm.town/v/postpostscript/hybridTaggedTemplateMethod";
    import { provideBlob } from "https://esm.town/v/postpostscript/provideBlob";

    export function provideBlobToHtml(script: RawHTML, placeholder?: unknown) {
    const id = "provideBlobHtml-" + Math.random().toString().slice(3);
    return html`
    <div id="${id}">
    ${placeholder}
    <script>
    const id = "${id}";
    ${script}
    .then(blob => blob.text())
    .then(text => {
    ⦚ 9 unchanged lines ⦚
    import { html, RawHTML } from "https://esm.town/v/postpostscript/html";
    import { hybridTaggedTemplateMethodAsync } from "https://esm.town/v/postpostscript/hybridTaggedTemplateMethod";
    import { provideBlob } from "https://esm.town/v/postpostscript/provideBlob";

    export function provideBlobToHtml(jsPromise: RawHTML, placeholder?: unknown) {
    const id = "provideBlobHtml-" + Math.random().toString().slice(3);
    return html`
    <div id="${id}">
    ${placeholder}
    <script>
    const id = "${id}";
    ${jsPromise}
    .then(blob => blob.text())
    .then(text => {
    ⦚ 9 unchanged lines ⦚
  • v3

    2/29/2024
    Open: Version
    +23
    -0

    import { html, RawHTML } from "https://esm.town/v/postpostscript/html";
    import { hybridTaggedTemplateMethodAsync } from "https://esm.town/v/postpostscript/hybridTaggedTemplateMethod";
    import { provideBlob } from "https://esm.town/v/postpostscript/provideBlob";

    export function provideBlobToHtml(script: RawHTML, placeholder?: unknown) {
    const id = "provideBlobHtml-" + Math.random().toString().slice(3);
    return html`
    <div id="${id}">
    ${placeholder}
    <script>
    const id = "${id}";
    ${script}
    .then(blob => blob.text())
    .then(text => {
    const $div = document.createElement("div")
    $div.innerHTML = html
    $div.id = id
    document.getElementById(id).replaceWith(id)
    })
    </script>
    </div>
    `;
    }
Updated: March 2, 2024