PageSourceSearch

https://jarunmb.com/assets/controllers/media_reload_controller-749…c8fbaeb0682340c9f233e1174513b36cc499b00f.js

js jarunmb.com collected 2026-10-08 23:50:34 UTC 840 bytes, 18 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2import { reloadStrandedMedia } from "helpers/media_reload"
3
4// Restarts media that a Turbo visit brought onto the page dead — see helpers/media_reload
5// for why the browser leaves it that way.
6//
7// The elements sit inside author-written body HTML, which also reaches the page through
8// fragment caches and stored post excerpts, so they can't be given Stimulus targets. Sweeping
9// the page finds them wherever they came from.
10//
11// Pulse post bodies are the exception: they arrive inside <template shadowrootmode>, which
12// this sweep can't see, and which isn't hydrated yet when this body-level controller connects.
13// shadow_dom_hydrator_controller repairs those as it attaches them.
14export default class extends Controller {
15  connect() {
16    reloadStrandedMedia(this.element)
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.