1import { Turbo } from "@hotwired/turbo-rails"; 2 3Object.assign(Turbo.PageRenderer.prototype, { 4 assignNewBody() { 5 const container = document.querySelector("#turbo-body"); 6 const newContainer = this.newElement.querySelector("#turbo-body"); 7 8 // timeout necessary to ensure correct page cache behaviour. 9 // see https://github.com/hotwired/turbo/pull/305#issuecomment-1183505367 for more explanation 10 setTimeout(() => { 11 if (container && newContainer) { 12 container.replaceWith(newContainer); 13 } else { 14 document.body.replaceWith(this.newElement); 15 } 16 }, 0); 17 }, 18});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.