WindowController class Null safety

Defines behavior of the browser APIs (such as navigation events).

Example

import 'package:universal_html/parsing.dart';

Future<void> main() async {
  final controller = WindowController();
  await controller.openHttp(
    method: 'GET',
    uri: Uri.parse('https://www.ietf.org/'),
  );
  final document = controller.window.document;
  // ...
}

Constructors

WindowController()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
isTopLevelWindowInsideBrowser bool
Returns true if this controller for the top-level window inside a browser. [...]
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
window Window?
Gets window controlled by this WindowController.
read / write
windowBehavior WindowBehavior
Behavior of the window.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
openContent(String content, {ContentType? contentType}) → void
Opens the content.
openFile(File file) Future<void>
Opens the file.
openHttp({String method = 'GET', required Uri uri, ContentType? contentType}) Future<void>
Loads content using HTTP client. [...]
openUri(Uri uri) Future<void>
Loads content from "file", "http", or "https" URI.
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

topLevel WindowController
Instance returned by top-level window variable.
final