OOPIF for PDF Viewer Flag causing issue for many customers since yesterday

1,961 views
Skip to first unread message

Adnan Khan

unread,
Aug 7, 2024, 5:30:36 PM8/7/24
to Chromium Extensions
Our business is affected as many customers are facing issue with OOPIF. This flag is somehow now enabled for majority of customers despite the flag is set to "default" in chrome://flags.

Problem with this flag getting enabled is that, right now, on PDF pages, we are inserting our extension buttons to help them send PDFs over to centralized place but the flag is restricting our ability to do so.

In our code, we were first finding embed element through below code
 if (
    (document.querySelector("embed") &&
      document.querySelector("embed").type === "application/pdf") ||
    innerIframePdf
  ) But right now the problem is that, the shadow root with the flag enable is showing as "closed". I'm really wondering how to access PDF if that flag is even enabled in future?((OOPIF)).

Whats the possible solution for this problem?

woxxom

unread,
Aug 8, 2024, 12:58:57 AM8/8/24
to Chromium Extensions, Adnan Khan
> despite the flag is set to "default" in chrome://flags

The feature is enabled directly via field trials, you can see them in chrome://version/?show-variations-cmd

> shadow root with the flag enable is showing as "closed".

Use chrome.dom.openOrClosedShadowRoot(document.body)

> I'm really wondering how to access PDF if that flag is even enabled in future?

There's no API to actually access it and there never was. Previously, due to a bug, it was possible to fake some of the internal messages to extract data, but not anymore. You can suggest implementing some simple API for extensions in https://crbug.com, it should be useful for a lot of extensions and lots of users.
Reply all
Reply to author
Forward
0 new messages