+
Skip to content

[Feature Request]: Set border-radius for BrowserView. #33426

@Shintarot

Description

@Shintarot

Preflight Checklist

Problem Description

I am aware that currently the only setting items for BrowserView style are setBounds and setBackgroundColor.
https://www.electronjs.org/docs/latest/api/browser-view

Is there any way to set border-radius (rounded corner) for BrowserView?

If not, I would be very happy to see it implemented.

Proposed Solution

I think it should be implemented in the constructor or instance method of BrowserView.

// in constructor
const view = new BrowserView({
    borderRadius: 12,
});

// instance method
view.setBorderRadius(12);

Alternatives Considered

I have tried editing the HTML within webContents, but adding border-radius to <html /> does not work (children do not fit).

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载