Skip to content

Commit 6031c1f

Browse files
authored
Delete all deprecated members (#347)
1 parent 5a39fdc commit 6031c1f

File tree

7 files changed

+2
-446
lines changed

7 files changed

+2
-446
lines changed

web/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Removed renames `UnderlyingSource` and `UnderlyingSourceBase` where the types
55
don't exist.
66
- Fixed generation of variadic arguments to generate 4 optional parameters.
7+
- Removed all `@Deprecated` members.
78

89
## 1.1.1
910

web/lib/helpers.dart

Lines changed: 0 additions & 8 deletions
This file was deleted.

web/lib/src/helpers.dart

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -21,83 +21,10 @@
2121
/// whether to consume some of the APIs provided here.
2222
library;
2323

24-
import 'dart:js_interop';
25-
import 'dart:js_interop_unsafe';
26-
27-
import 'dom.dart';
28-
import 'helpers/lists.dart';
29-
3024
export 'helpers/cross_origin.dart' show CrossOriginLocation, CrossOriginWindow;
3125
export 'helpers/enums.dart';
3226
export 'helpers/events/events.dart';
3327
export 'helpers/events/providers.dart';
3428
export 'helpers/events/streams.dart' show ElementStream, EventStreamProvider;
3529
export 'helpers/extensions.dart';
36-
export 'helpers/http.dart';
3730
export 'helpers/lists.dart';
38-
export 'helpers/renames.dart';
39-
40-
/// Create an [HTMLElement] with the specified [tagName].
41-
/// If no element with [tagName] exists, returns an [HTMLUnknownElement].
42-
///
43-
/// Deprecated in favor of creating the element like other HTML elements:
44-
///
45-
/// ```dart
46-
/// final anchor = document.createElement('a') as HTMLElement;
47-
/// ```
48-
@Deprecated('Use the specific HTMLElement constructor instead.')
49-
HTMLElement createElementTag(String tagName) =>
50-
document.createElement(tagName) as HTMLElement;
51-
52-
/// Create an [HTMLCanvasElement] in the current [document].
53-
///
54-
/// Deprecated in favor of creating the element like other HTML elements:
55-
///
56-
/// ```dart
57-
/// final canvas = document.createElement('canvas') as HTMLCanvasElement
58-
/// ..width = 256
59-
/// ..height = 256;
60-
/// ```
61-
@Deprecated('Use the HTMLCanvasElement constructor instead.')
62-
HTMLCanvasElement createCanvasElement({int? width, int? height}) {
63-
final result = document.createElement('canvas') as HTMLCanvasElement;
64-
if (width != null) result.width = width;
65-
if (height != null) result.height = height;
66-
return result;
67-
}
68-
69-
/// Create an [HTMLIFrameElement] in the current [document].
70-
///
71-
/// Deprecated in favor of creating the element like other HTML elements:
72-
///
73-
/// ```dart
74-
/// final embed = document.createElement('iframe') as HTMLIFrameElement;
75-
/// ```
76-
@Deprecated('Use the HTMLIFrameElement constructor instead.')
77-
HTMLIFrameElement createIFrameElement() =>
78-
document.createElement('iframe') as HTMLIFrameElement;
79-
80-
@JS('Audio')
81-
external JSFunction get _audioConstructor;
82-
// While `new Audio()` is a different syntax from
83-
// `document.createElement('audio')`, it looks like they're the same:
84-
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement/Audio#usage_notes
85-
@Deprecated('Use the HTMLAudioElement constructor instead.')
86-
HTMLAudioElement createAudioElement() => _audioConstructor.callAsConstructor();
87-
88-
/// Finds and returns the first element within the [document]
89-
/// that matches the specified CSS [selector] string.
90-
/// If no match is found, `null` is returned.
91-
///
92-
/// Deprecated in favor of querying directly on the [document]:
93-
///
94-
/// ```dart
95-
/// final dartDiv = document.querySelector('div.dart');
96-
/// ```
97-
@Deprecated('Directly use document.querySelector instead.')
98-
Element? querySelector(String selector) => document.querySelector(selector);
99-
100-
@Deprecated('Use JSImmutableListWrapper<TouchList, Touch> instead.')
101-
class TouchListWrapper extends JSImmutableListWrapper<TouchList, Touch> {
102-
TouchListWrapper(super._original);
103-
}

web/lib/src/helpers/extensions.dart

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ library;
2323

2424
import 'dart:convert';
2525
import 'dart:js_interop';
26-
import 'dart:math' show Point;
2726

2827
import '../dom.dart';
29-
import 'lists.dart';
3028

3129
export 'cross_origin.dart'
3230
show CrossOriginContentWindowExtension, CrossOriginWindowExtension;
@@ -58,60 +56,6 @@ extension HTMLCanvasElementGlue on HTMLCanvasElement {
5856
}
5957
}
6058

61-
extension CanvasRenderingContext2DGlue on CanvasRenderingContext2D {
62-
@Deprecated('See CanvasRenderingContext2D.drawImage')
63-
void drawImageScaled(
64-
CanvasImageSource image,
65-
double dx,
66-
double dy,
67-
double dw,
68-
double dh,
69-
) =>
70-
drawImage(image, dx, dy, dw, dh);
71-
}
72-
73-
extension NodeGlue on Node {
74-
@Deprecated('See Node.textContent')
75-
set text(String s) => textContent = s;
76-
@Deprecated('See Node.appendChild()')
77-
Node append(Node other) => appendChild(other);
78-
@Deprecated('See Node.cloneNode()')
79-
Node clone(bool? deep) => cloneNode(deep ?? false);
80-
}
81-
82-
extension EventGlue on MouseEvent {
83-
/// A [Point] representation of the [clientX] and [clientY] properties
84-
/// of this [MouseEvent].
85-
///
86-
/// **Deprecated:** Prefer directly accessing
87-
/// the [clientX] and [clientY] properties on [MouseEvent].
88-
@Deprecated('Instead directly access the clientX and clientY properties.')
89-
Point get client => Point(clientX, clientY);
90-
}
91-
92-
extension TouchGlue on Touch {
93-
/// A [Point] representation of the [clientX] and [clientY] properties
94-
/// of this [Touch] event.
95-
///
96-
/// **Deprecated:** Prefer directly accessing
97-
/// the [clientX] and [clientY] properties on [Touch].
98-
@Deprecated('Instead directly access the clientX and clientY properties.')
99-
Point get client => Point(clientX, clientY);
100-
}
101-
102-
extension StorageGlue on Storage {
103-
@Deprecated('Use Storage.getItem instead')
104-
String? operator [](String key) => getItem(key);
105-
@Deprecated('Use Storage.setItem instead')
106-
void operator []=(String key, String value) => setItem(key, value);
107-
}
108-
109-
@Deprecated('Use JSImmutableListWrapper<TouchList, Touch> instead.')
110-
extension TouchListConvert on TouchList {
111-
@Deprecated('Use JSImmutableListWrapper<TouchList, Touch> directly instead.')
112-
List<Touch> toList() => JSImmutableListWrapper<TouchList, Touch>(this);
113-
}
114-
11559
extension XMLHttpRequestGlue on XMLHttpRequest {
11660
/// Returns all response headers as a key-value map.
11761
///

0 commit comments

Comments
 (0)