Coder Social home page Coder Social logo

Comments (2)

github-actions avatar github-actions commented on June 12, 2024

Please fix the format of your markdown:

3:43 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
5:1 MD033/no-inline-html Inline HTML [Element: img]

generated by check-issue

from rod.

ysmood avatar ysmood commented on June 12, 2024

Yes, you can. Check the api in this file:

type CSSStyleSheetID string

rod/examples_test.go

Lines 410 to 432 in c35d2ab

// When rod doesn't have a feature that you need. You can easily call the cdp to achieve it.
// List of cdp API: https://github.com/go-rod/rod/tree/main/lib/proto
func Example_direct_cdp() {
page := rod.New().MustConnect().MustPage()
// Rod doesn't have a method to enable AD blocking,
// but you can call cdp interface directly to achieve it.
// The two code blocks below are equal to enable AD blocking
{
_ = proto.PageSetAdBlockingEnabled{
Enabled: true,
}.Call(page)
}
{
// Interact with the cdp JSON API directly
_, _ = page.Call(context.TODO(), "", "Page.setAdBlockingEnabled", map[string]bool{
"enabled": true,
})
}
}

from rod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.