How to access the DOM in Manifest Version 3 with Offscreen Documents - Chrome Extensions

preview_player
Показать описание

Hey! In this video we take a look at how to access the DOM using an Offscreen Document in manifest version 3. Previously you could use a background page to work with the DOM in manifest version 2 but since v3 was released this was not possible, offscreen documents are coming soon to bring extra functionality back into extensions & MV3.

RELATED LINKS:

TIMESTAMPS:
0:00 Intro
1:00 MV3 Known Issues
1:30 Example Extension
2:50 Code
8:05 Browser Extension Academy
9:07 Extension Jobs

VIDEO SUGGESTIONS?

FIND ME ONLINE:
Рекомендации по теме
Комментарии
Автор

Wow, long overdue. There are at least 2 extensions I built in the past few months that required seriously annoying work arounds. This is a great!

reprovedcandy
Автор

This is awesome.
One question, is the offscreen document has the same context as content script or other extension pages (e.g popup)?

sleepy-dev
Автор

Thank you for the complete code. Is the offscreen API the right approach to modify webpage content? It used to be simple to resize a messaging input field...

justrobin
Автор

Hi, Thanks for the viedo, But I have a question. When I tried to sendMessage like below code shows,

(tab) => {
await chrome.runtime.sendMessage({ type: "pause", offscreen: true });
});

it reprot error: 3 worker.js:53 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.



does there have any solutions?Thank you!!

yaadele
Автор

Do offscreen documents have access to chrome storage? I didn't find anything about it in the documents

selahattinemrekutlu
Автор

what's the difference between the course in skillshare and the course you mentioned in this video

ylovers
Автор

Isn't offscreen API available in 109+? So, the current version of chrome supports

ylovers
Автор

Hi! Thanks for the video! I've been playing around for a while with offscreen documents and find them extremely useful. What is your estimate on when it will be safe to use in production? I'm not experienced updating to cutting edge APIs, and I really don't want my extension to break for users.

gregtasi
Автор

Hey, I am looking for a way to inject HTML code into the DOM. In my little knowledge, maybe through the content_script? right now I am doing it like that but creating and appending tags, and that way is not efficient. I am looking to inject a whole html doc, maybe? any guide and help will be much appreciated. Thanks!

ronaldceballos
Автор

Thank you for the video, very informative! Exciting stuff about offscreen documents - that will be quite useful, especially for working with media like audio, video and canvas! also, the "Extension Jobs" section of your site is a great Idea - there is a high demand for good chrome extension developers :)

bashvlas
Автор

Hello, love the content! But for your course in SkillShare, I am currently having an issue with video #3. I noticed they no longer use Version 2 and have moved on to Version 3. Was wondering if you could revamp the video to where we "Noobies" like myself could understand better. Please and thank you! 😊

thomasmax
Автор

I tried giving it a music stream url but it stops working if I close the popup.html

piip
Автор

How to do unsafe eval in mainfest version 3 in the content script ?

clarenceparmar
Автор

Are you still doing the Hiring? Looking to potentially hire a few people.

adamwannon
Автор

Hi Rusty . I am working on a extension which for using to work with download manager app . I have a local server and i have a background.js file which help me to contact with api. i want to extract all links in Page, In other Way, Access to DOM and then send the link with background.js file to local api. but it does not have access to DOM of current tab . how can i access to dom and then extract and then send them ? i send datas in background.js and I want a way to proccess the DOM and then send results with background.js

vahiddopler
Автор

Hello, Thanks For the video!
can you please help me with how can I localize my extension and change language! I did add the but this only match the UI language, I want to be able to select the language myself

tamarashehadeh