Repository navigation
v3.1.0
-
sdk: ^3.13.0
-
DataStorage:- Fix:
_getStorageValuereturned the storage read unawaited insidetry, so asynchronous read errors escaped the
catch(not logged, not turned intonull).
- Fix:
-
CanvasImageViewer:- Constructor uses Dart 3.12 private named parameters (
this._clip,this._rectangles, …); the named arguments
(clip:,rectangles:, …) are unchanged.
- Constructor uses Dart 3.12 private named parameters (
-
isInDOM: usesObject?.isA<Node>()(Dart 3.12). -
Fixes in
dom_tools_base.dart:elementOnLoadandprefetchHref: complete withfalsewhen loading fails (they never completed).createHTML/createElement:<thead>HTML creates athead(the pattern saidthread).getElementDocumentPosition: no longer adds the element's own offset twice when it has anoffsetParent.setMetaViewportScale:minimumScalealone applies, andmaximumScalealone no longer throws.toHTML: renders the real attribute names (it rendered a literalattr).replaceElement: fixedNotFoundError(swappedinsertBeforearguments).isOrientationInLandscapeMode/isOrientationInPortraitMode: no longer throw wherewindow.orientationis
undefined (desktop); fall back toscreen.orientation.type, or to the window's aspect ratio where
screen.orientationis missing (e.g. desktop Safari before 16.4).resetZoom: the retry counter now increments.setDivCentered: removed a leftover debugprint.
-
Fixes in
dom_tools_js.dart,dom_tools_touch.dart,dom_tools_document.dart:addJavaScriptSource: completes withfalsewhen the script fails to load (it never completed).touchEventToMouseEvent:touchendconverts tomouseup(viachangedTouches), so
redirectOnTouchEndToMouseEventfires.downloadBytes: downloads the actual bytes (each byte was a stringifiedBlobpart:[65,66,67]→"656667").markdownToDiv(normalize:)is honored, and{:target="_blank"}link attributes are no longer HTML-escaped.reloadAssets: reloads the assets and completes withtrue(it removed its iframe on the firstload, so it
returnedfalseat the timeout, or never completed without one).
-
Fixes in
dom_tools_css.dart:getComputedStyle: returns the computed properties (it returned an empty declaration in Chromium).addCssSource: completes withfalsewhen the stylesheet fails to load (it never completed).setElementScrollColors: the class id includes the background color (elements with different track colors
shared one class).StyleColor(int).toString(): keeps leading zero digits (0x00112233rendered#2233).loadCSS(prefix, null)(andCSSThemeSetwithout themes): no-op instead of throwing.addElementsClasses: ignores blank class names (they threw aSyntaxError).- Viewport media rules to classes: nested rules (e.g.
@supports) no longer leak into the output as invalid rules
(filter withisA<CSSStyleRule>()—whereTypecan't tell JS interop types apart).
-
Fixes in
dom_data_storage.dart,dom_tools_file.dart,dom_tools_dialog.dart:State.listenAlllisteners are called once per event (they were called an increasing number of times).State.get<List<int>>()/<List<double>>()/<List<num>>(): no longer throw aTypeError(they always did);
entries that can't be parsed are skipped.removeExifFromImageFile: no longer hangs (the imageloadlistener was attached after settingsrc).readFileInputElementAsString(removeExifFromImage: true): returns the file content (it returned the MIME type).- Image dialog rotate button: fixed
LateInitializationError(it matched the close button as the image).
-
Fixes in
dom_tools_paint.dart,dom_tools_track.dart:Color.parse('r, g, b')is opaque (it had alpha 0). Also accepts an alpha component (r, g, b, a, as a0..1
ratio or0..255) and argb(...)/rgba(...)wrapper.cropImageByRectangle: acceptsRectangle<double>(non-integral values are truncated).CanvasImageViewer.rectanglesViewerElementFromNums: fixed aTypeErrorforStringentries.TrackElementValue: non-periodic tracking ends after the first change event (it ended after the first check).TrackElementInViewport: fixedonEnterViewport/onLeaveViewportnever firing after the first check interval.TrackElementResize(fallback withoutResizeObserver): listens to theresizeevent (it listened to
onresize, which never fires).
-
Now based on
web_utils1.1.0 andjs_interop_utils1.1.1, which bring:- Typed lists
.toJS(e.g.Uint8ClampedList) producing JS typed arrays for code importingdom_tools
(they produced plain JSArrays). isA-basedasJSAny/asJSObject.toListNum/toListOfIntno longer cap whole numbers beyond±(2^53 - 1)(ajs_interop_utils1.1.0 bug).
- Typed lists
-
Dependencies:
- web_utils: ^1.1.0
- js_interop_utils: ^1.1.1
- test: ^1.32.0
- dependency_validator: ^5.1.0
-
Tests (browser integration tests, dart2js and dart2wasm):
- Added
test/dom_tools_base_document_js_test.dart,test/dom_tools_css_storage_file_test.dartand
test/dom_tools_paint_track_test.dart.
- Added