How to modify a DocumentFragment (#document) of a website by using a Chrome extension?

I am making a Chrome extension.

I inject a file.js in a website.

I would like to modified a DocumentFragment which is present in the website.

But as the #Document is not in the DOM but in the cash-memory of Chrome I don’t succeed.

Which solution(s) do you propose to modify a DocumentFragment of a website using a Chrome extension ?

Thanks for your support!