Skip to content

Commit

Permalink
fix: some websites using WebComponents V0 not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jan 22, 2020
1 parent 100a85f commit c12adfd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions buildflags/BUILD.gn
Expand Up @@ -21,6 +21,7 @@ buildflag_header("buildflags") {
"ENABLE_ELECTRON_EXTENSIONS=$enable_electron_extensions",
"ENABLE_BUILTIN_SPELLCHECKER=$enable_builtin_spellchecker",
"ENABLE_PICTURE_IN_PICTURE=$enable_picture_in_picture",
"ENABLE_WEBCOMPONENTS_V0=$enable_webcomponents_v0",
"ENABLE_MEDIA_KEY_OVERRIDES=$enable_media_key_overrides",
"OVERRIDE_LOCATION_PROVIDER=$enable_fake_location_provider",
]
Expand Down
2 changes: 2 additions & 0 deletions buildflags/buildflags.gni
Expand Up @@ -22,6 +22,8 @@ declare_args() {

enable_picture_in_picture = true

enable_webcomponents_v0 = true

enable_media_key_overrides = true

# Provide a fake location provider for mocking
Expand Down
6 changes: 6 additions & 0 deletions shell/browser/feature_list.cc
Expand Up @@ -27,6 +27,12 @@ void InitializeFeatureList() {
// when node integration is enabled.
disable_features +=
std::string(",") + features::kSpareRendererForSitePerProcess.name;
#if BUILDFLAG(ENABLE_WEBCOMPONENTS_V0)
// https://www.polymer-project.org/blog/2018-10-02-webcomponents-v0-deprecations
// Any website which uses older WebComponents will currently fail in Electron.
enable_features += std::string(",") + "WebComponentsV0Enabled";
#endif

#if !BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
disable_features += std::string(",") + media::kPictureInPicture.name;
#endif
Expand Down

0 comments on commit c12adfd

Please sign in to comment.