question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I set the frame resources?

See original GitHub issue

Is Chrome running in a container? NO

Thanks to existing knowledge here, I can write codes to get frame resources as follows. However, I couldn’t figure out how to set the frame resources. Do you have any ideas?

const CDP = require('chrome-remote-interface');

async function example() {
    let client;
    try {
        // connect to endpoint
        client = await CDP();
        // extract domains
        const {Network, Page} = client;
        await Network.enable();
        await Page.enable();
        const {frameTree} = await Page.getResourceTree();
        console.log(frameTree.resources);
        Page.addScriptToEvaluateOnNewDocument({source: script});
        await Page.navigate({url: 'https://github.com'});
        await Page.loadEventFired();
    } catch (err) {
        console.error(err);
    } finally {
        if (client) {
            await client.close();
        }
    }
}

example();

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cyrus-andcommented, Aug 14, 2021

Can I use codes from other issue pages in this repository without the license, too?

Sure!

1reaction
cyrus-andcommented, Aug 14, 2021

Glad to help! They have none, use them freely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frame Guides and Resources - Frame VR
This is a collection of short videos and guides to help you learn how to use Frame. Don't see a video for a...
Read more >
Frames Resources - Tech4Learning
Use these lessons, resources, samples, and standards to get started integrating Frames into your classroom curriculum. Curriculum Guides. From classroom ...
Read more >
Create frame information - IBM
To create the frame information, perform the following steps: Press the Create containing hardware resource function key.
Read more >
<iframe>: The Inline Frame element - HTML - MDN Web Docs
The HTML element represents a nested browsing context, embedding another HTML page into the current one.
Read more >
DIY Custom Picture Framing Resources - American Frame
At American Frame, we're here to help present your art beautifully, and always in the best light. Find helpful resources for online custom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found