-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure router only targets scripts for execution (#12177)
* Ensure router only targets scripts for execution * Add a test * Move the test up to the file that's testing * remove extra prop * just see if tests pass * use local file * smaller file * use getElementsByTagName again
- Loading branch information
Showing
5 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Ensure we target scripts for execution in the router | ||
|
||
Using `document.scripts` is unsafe because if the application has a `name="scripts"` this will shadow the built-in `document.scripts`. Fix is to use `getElementsByTagName` to ensure we're only grabbing real scripts. |
Binary file added
BIN
+457 KB
packages/astro/e2e/fixtures/view-transitions/src/assets/astro-build.mp4
Binary file not shown.
7 changes: 5 additions & 2 deletions
7
packages/astro/e2e/fixtures/view-transitions/src/components/Video.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<video controls="" autoplay="" name="media" transition:persist transition:name="video" autoplay> | ||
<source src="https://ia804502.us.archive.org/33/items/GoldenGa1939_3/GoldenGa1939_3_512kb.mp4" type="video/mp4"> | ||
--- | ||
import vidUrl from '../assets/astro-build.mp4'; | ||
--- | ||
<video controls="" autoplay="" transition:persist transition:name="video" autoplay> | ||
<source src={vidUrl} type="video/mp4"> | ||
</video> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters