.. / turbo-frame
Star Fork

The speed of a single-page web application without having to write any JavaScript.

turbo
hotwired
...

Latest

<a> @href @data-* ⏱️ any
More information

Root Cause

Source: https://github.com/hotwired/turbo/blob/71a769167eb64fafed48fe45ed175a54738216af/src/core/frames/frame_controller.js#L122

async loadResponse(fetchResponse) {
  if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {
    this.sourceURL = fetchResponse.response.url
  }

  try {
    const html = await fetchResponse.responseHTML
    if (html) {
      const document = parseHTMLDocument(html)
      const pageSnapshot = PageSnapshot.fromDocument(document)

      if (pageSnapshot.isVisitable) {
        await this.#loadFrameResponse(fetchResponse, document)
      } else {
        await this.#handleUnvisitableFrameResponse(fetchResponse)
      }
    }
  } finally {
    this.#shouldMorphFrame = false
    this.fetchResponseLoaded = () => Promise.resolve()
  }
}


Source | History