WebViewElement class abstract
A web view widget for showing html content.
- Implementers
Constructors
-
WebViewElement(int targetId, Pointer<
NativeElement> nativePtr, ElementManager elementManager, {required String tagName, String? initialUrl, JavascriptMode javascriptMode = JavascriptMode.unrestricted, Set<JavascriptChannel> ? javascriptChannels, Set<Factory< ? gestureRecognizers, bool debuggingEnabled = false, String userAgent = DEFAULT_USER_AGENT, AutoMediaPlaybackPolicy initialMediaPlaybackPolicy = AutoMediaPlaybackPolicy.require_user_action_for_all_media_types})OneSequenceGestureRecognizer> > - Creates a new web view.
Properties
- appearEventState ↔ AppearEventState
-
getter/setter pairinherited
- boundingClientRect → BoundingClientRect
-
no setterinherited
-
childNodes
↔ List<
Node> -
getter/setter pairinherited
-
children
→ List<
Element> -
no setterinherited
- debuggingEnabled → bool
-
Controls whether WebView debugging is enabled.
final
- defaultDisplay → String
-
The default display type.
finalinherited
- elementDelegate → ElementDelegate
-
no setterinherited
- elementManager ↔ ElementManager
-
getter/setter pairinherited
-
eventHandlers
↔ Map<
String, List< EventHandler> > -
getter/setter pairinherited
- firstChild → Node
-
no setterinherited
-
The value used for the HTTP User-Agent: request header.
A Boolean value indicating whether horizontal swipe gestures will trigger back-forward list navigations.
final
-
gestureRecognizers
→ Set<
Factory< ?OneSequenceGestureRecognizer> > -
Which gestures should be consumed by the web view.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ double?
-
getter/setter pair
- initialMediaPlaybackPolicy → AutoMediaPlaybackPolicy
-
Which restrictions apply on automatic media playback.
final
- initialUrl ↔ String?
-
The url that WebView loaded at first time.
getter/setter pair
- isConnected → bool
-
no setterinherited
- isInlineBox → bool
-
no setterinherited
- isInlineContent → bool
-
no setterinherited
- isRendererAttached → bool
-
no setterinherited
-
javascriptChannels
→ Set<
JavascriptChannel> ? -
The set of JavascriptChannels available to JavaScript code running in the web view.
final
- javascriptMode → JavascriptMode
-
Whether Javascript execution is enabled.
final
- lastChild → Node
-
no setterinherited
-
nativeElementPtr
→ Pointer<
NativeElement> -
finalinherited
-
nativeEventTargetPtr
→ Pointer<
NativeEventTarget> -
finalinherited
-
nativeNodePtr
→ Pointer<
NativeNode> -
finalinherited
-
A delegate function that decides how to handle navigation actions.
final
- nextSibling → Node?
-
no setterinherited
- nodeName ↔ String
-
getter/setter pairinherited
- nodeType ↔ NodeType
-
getter/setter pairinherited
- parent → Node?
-
The Node.parentNode read-only property returns the parent of the specified node in the DOM tree.
no setterinherited
- parentElement → Element?
-
The Node.parentElement read-only property returns the DOM node's parent Element,
or null if the node either has no parent, or its parent isn't a DOM Element.
no setterinherited
- parentNode ↔ Node?
-
getter/setter pairinherited
- platformRenderBox ↔ RenderBox?
-
The webview render box itself.
getter/setter pair
- previousSibling → Node?
-
no setterinherited
-
properties
→ Map<
String, dynamic> -
finalinherited
- renderBoxModel ↔ RenderBoxModel?
-
getter/setter pairinherited
- renderer → RenderObject?
-
no setterinherited
- repaintSelf ↔ bool
-
Should create repaintBoundary for this element to repaint separately from parent.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollHeight → double
-
no setterinherited
- scrollingContentLayoutBox ↔ RenderLayoutBox?
-
getter/setter pairinherited
- scrollLeft ↔ double
-
getter/setter pairinherited
- scrollTop ↔ double
-
getter/setter pairinherited
- scrollWidth → double
-
no setterinherited
- shouldConvertToRepaintBoundary → bool
-
Whether should create repaintBoundary for this element when style changed
no setterinherited
- size → dynamic
-
no setter
- sizedBox ↔ RenderConstrainedBox?
-
The constrained to platformed render box, applying width and height.
getter/setter pair
- style ↔ CSSStyleDeclaration
-
Style declaration from user input.
getter/setter pairinherited
- tagName → String
-
finalinherited
- targetId → int
-
finalinherited
- userAgent → String
-
When null the platform's webview default is used for the User-Agent header.
final
- viewportSize → dynamic
-
no setterinherited
- width ↔ double?
-
getter/setter pair
Methods
-
addChild(
RenderBox child) → void -
inherited
-
addChildRenderObject(
Element child, {RenderBox? after}) → void -
inherited
-
addEvent(
String eventType) → void -
inherited
-
addEventListener(
String eventType, EventHandler eventHandler) → void -
inherited
-
addEventResponder(
RenderPointerListenerMixin renderBox) → void -
inherited
-
appendChild(
Node child) → Node -
inherited
-
applyStickyChildrenOffset(
) → void -
inherited
-
attachTo(
Element parent, {RenderBox? after}) → void -
Attach a renderObject to parent.
inherited
-
bindNativeMethods(
Pointer< NativeElement> nativeElement) → void -
inherited
-
connectedCallback(
) → void -
inherited
-
contains(
Node child) → bool -
inherited
-
convertToNonRepaintBoundary(
) → void -
Convert renderBoxModel to non repaint boundary
inherited
-
convertToRepaintBoundary(
) → void -
Convert renderBoxModel to repaint boundary
inherited
-
createRenderer(
) → RenderObject -
Creates an instance of the RenderObject class that this
RenderObjectNode
represents, using the configuration described by thisRenderObjectNode
.inherited -
debugHideHighlight(
) → void -
inherited
-
debugHighlight(
) → void -
inherited
-
detach(
) → void -
Detach renderObject from parent.
inherited
-
didAttachRenderer(
) → void -
didDetachRenderer(
) → void -
disconnectedCallback(
) → void -
inherited
-
dispatchEvent(
Event event) → void -
inherited
-
dispose(
) → void -
Dispose renderObject, but not do anything.
inherited
-
ensureChildAttached(
) → void -
Ensure child and child's child render object is attached.
inherited
-
flushLayout(
) → void -
inherited
-
getElementById(
Element parentElement, int targetId) → Element? -
inherited
-
getEventHandlers(
) → Map< String, List< EventHandler> > -
inherited
-
getEventTarget(
) → EventTarget -
inherited
-
getOffset(
RenderBox renderBox) → Offset -
inherited
-
getOffsetX(
) → double -
inherited
-
getOffsetY(
) → double -
inherited
-
getProperty(
String key) → dynamic -
inherited
-
getRootNode(
) → Node -
inherited
-
handleAppear(
) → void -
inherited
-
handleDisappear(
) → void -
inherited
-
handleIntersectionChange(
IntersectionObserverEntry entry) → void -
inherited
-
handleMethodClick(
) → void -
inherited
-
handleMouseEvent(
String eventType, TapUpDetails details) → void -
inherited
-
insertBefore(
Node child, Node referenceNode) → Node -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDetach(
) → void -
onFocus(
) → void -
onPageFinished(
String? url) → void - Invoked when a page has finished loading.
-
onPageStarted(
String? url) → void - Invoked when a page starts loading.
-
onPostMessage(
String? message) → void -
onWebViewCreated(
WebViewController controller) → void - If not null invoked once the web view is created.
-
paintFixedChildren(
double scrollOffset, AxisDirection axisDirection) → void -
Normally element in scroll box will not repaint on scroll because of repaint boundary optimization
So it needs to manually mark element needs paint and add scroll offset in paint stage
inherited
-
removeChild(
Node child) → Node -
inherited
-
removeEvent(
String eventType) → void -
inherited
-
removeEventListener(
String eventType, EventHandler eventHandler) → void -
inherited
-
removeEventResponder(
RenderPointerListenerMixin renderBox) → void -
inherited
-
removeProperty(
String key) → void -
inherited
-
replaceChild(
Node newNode, Node oldNode) → Node? -
inherited
-
scrollBy(
{num dx = 0.0, num dy = 0.0, bool? withAnimation}) → void -
inherited
-
scrollTo(
{num? x, num? y, bool? withAnimation}) → void -
inherited
-
setProperty(
String key, dynamic value) → void -
setRenderStyle(
String key, dynamic value) → void -
inherited
-
setStyle(
String key, dynamic value) → void -
inherited
-
toBlob(
{double? devicePixelRatio}) → Future< Uint8List> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateFilterEffects(
RenderBoxModel renderBoxModel, String filter) → void -
inherited
-
updateRenderOverflow(
Element element) → void -
inherited
-
updateRenderVisibility(
Visibility visibility) → void -
inherited
-
willAttachRenderer(
) → void - The renderObject will be / has been insert into parent. You can apply properties to renderObject.
-
willDetachRenderer(
) → void -
A render object previously associated with this Node will be / has been removed
from the tree. The given RenderObject will be of the same type as
returned by this object's createRenderer.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- platform ↔ WebViewPlatform?
-
The WebView platform that's used by this WebView.
getter/setter pair