Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
FrameElement.reload()
without an initial [src]
attribute
The problem --- If a `<turbo-frame>` element is rendered without a `[src]` attribute, calls to `.reload()` will have no effect. If a `<turbo-frame>` is to be its own browsing context, it should be able to apply its current location (that is, it's owning document's current location) to its browsing context. The solution --- When `FrameElement.reload()` is invoked, it delegates to its delegate instance's `sourceURLReloaded()` method. In all cases, `FrameElement.delegate` is an instance of `FrameController`. This commit extends the `FrameController.sourceURLReloaded()` implementation to set the element's `[src]` attribute to the element's [baseURI][] value, which sets off the usual attribute change listeners and `<turbo-frame>` navigation logic. [baseURI]: https://developer.mozilla.org/en-US/docs/Web/API/Node/baseURI
- Loading branch information