Skip to content

Instantly share code, notes, and snippets.

@DigiTec
Last active March 25, 2017 20:22
Show Gist options
  • Save DigiTec/642650ccdedae8111964470230d0e2a0 to your computer and use it in GitHub Desktop.
Save DigiTec/642650ccdedae8111964470230d0e2a0 to your computer and use it in GitHub Desktop.
Chromium confessions blog entry on plumbing a bool
bool HTMLElementElement::isNewFeatureAllowed(bool defaultValue) {
KURL frame_url = document.url();
if (frame_url.host() == "example.com" || frame_url.host().endsWith(".example.com")) {
return false;
}
return defaultValue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment