CSS_DISPLAY_NONE property

ContentBlockerActionType CSS_DISPLAY_NONE
final

Hides elements of the page based on a CSS selector. A selector field contains the selector list. Any matching element has its display property set to none, which hides it.

NOTE: on Android, JavaScript must be enabled.

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • MacOS

Implementation

static final CSS_DISPLAY_NONE =
    ContentBlockerActionType._internalMultiPlatform('css-display-none', () {
  switch (defaultTargetPlatform) {
    case TargetPlatform.android:
      return 'css-display-none';
    case TargetPlatform.iOS:
      return 'css-display-none';
    case TargetPlatform.macOS:
      return 'css-display-none';
    default:
      break;
  }
  return null;
});