Skip to content

Conversation

@danielhjacobs
Copy link
Contributor

No description provided.

@danielhjacobs danielhjacobs added A-web Area: Web & Extensions T-compat Type: Compatibility with Flash Player labels Dec 8, 2025
@danielhjacobs danielhjacobs requested a review from evilpie December 8, 2025 17:31
@kjarosh
Copy link
Member

kjarosh commented Dec 9, 2025

Can we add a polyfill test for it?

@danielhjacobs
Copy link
Contributor Author

Done

@danielhjacobs danielhjacobs force-pushed the polyfill-document-embeds branch from 598d8f0 to 389d766 Compare December 10, 2025 15:57
@evilpie
Copy link
Collaborator

evilpie commented Dec 10, 2025

This breaks documen.embeds == document.embeds and probably other invariants.

@danielhjacobs danielhjacobs force-pushed the polyfill-document-embeds branch from 389d766 to 15592b4 Compare December 10, 2025 19:27
@danielhjacobs
Copy link
Contributor Author

This breaks documen.embeds == document.embeds and probably other invariants.

Fixed in the latest commit

@danielhjacobs danielhjacobs force-pushed the polyfill-document-embeds branch 2 times, most recently from cfe5234 to 59263f6 Compare December 10, 2025 19:34
@kjarosh kjarosh added the waiting-on-author Waiting on the PR author to make the requested changes label Dec 21, 2025
@danielhjacobs danielhjacobs force-pushed the polyfill-document-embeds branch from 59263f6 to 8c820cf Compare January 5, 2026 14:48
@danielhjacobs danielhjacobs removed the waiting-on-author Waiting on the PR author to make the requested changes label Jan 5, 2026
@danielhjacobs danielhjacobs requested a review from kjarosh January 5, 2026 15:26
@danielhjacobs danielhjacobs requested a review from kjarosh January 6, 2026 21:17
@danielhjacobs danielhjacobs force-pushed the polyfill-document-embeds branch from 3ccbcf9 to 3a506e8 Compare January 6, 2026 21:21
@kjarosh
Copy link
Member

kjarosh commented Jan 8, 2026

LGTM, but would be great if someone else (that knows more about polyfilling) would also take a look at this

@danielhjacobs danielhjacobs force-pushed the polyfill-document-embeds branch from 7a8a34a to 02c65c7 Compare January 8, 2026 21:08
interface CachedCollection extends HTMLCollection {
[CACHE_SYM]?: true;
}
Object.defineProperty(Document.prototype, "embeds", {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I have one more question: why doesn't it refer back to embeds for unknown keys?

Let's say that a website uses another extension (called foo) that makes some embeds work, and suppose it works similarly to Ruffle, changing embed to foo-embed. foo will also have to polyfill Document.embeds because of the same reasons, but by using the current approach those two polyfills will conflict with each other.

If I were to write this polyfill, I would assume that Document.embeds contains all non-Ruffle embeds, and then refer to it for length and unknown keys, at the same time making sure I don't polyfill it for the second time. Doesn't it make sense?

@kjarosh kjarosh added the polyfill Issues with the web polyfill (replacing classic Flash embeds with Ruffle) label Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-web Area: Web & Extensions polyfill Issues with the web polyfill (replacing classic Flash embeds with Ruffle) T-compat Type: Compatibility with Flash Player

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants