Skip to content

Commit

Permalink
fix: BrowserView setBackgroundColor()
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Nov 9, 2021
1 parent 4b3aed5 commit 2f5f4ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shell/browser/api/electron_api_browser_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ gfx::Rect BrowserView::GetBounds() {
}

void BrowserView::SetBackgroundColor(const std::string& color_name) {
view_->SetBackgroundColor(ParseHexColor(color_name));
if (!web_contents())
return;

auto* wc = web_contents()->web_contents();
wc->SetPageBaseBackgroundColor(ParseHexColor(color_name));
}

v8::Local<v8::Value> BrowserView::GetWebContents(v8::Isolate* isolate) {
Expand Down

0 comments on commit 2f5f4ae

Please sign in to comment.