|
21 | 21 | /// whether to consume some of the APIs provided here.
|
22 | 22 | library;
|
23 | 23 |
|
24 |
| -import 'dart:js_interop'; |
25 |
| -import 'dart:js_interop_unsafe'; |
26 |
| - |
27 |
| -import 'dom.dart'; |
28 |
| -import 'helpers/lists.dart'; |
29 |
| - |
30 | 24 | export 'helpers/cross_origin.dart' show CrossOriginLocation, CrossOriginWindow;
|
31 | 25 | export 'helpers/enums.dart';
|
32 | 26 | export 'helpers/events/events.dart';
|
33 | 27 | export 'helpers/events/providers.dart';
|
34 | 28 | export 'helpers/events/streams.dart' show ElementStream, EventStreamProvider;
|
35 | 29 | export 'helpers/extensions.dart';
|
36 |
| -export 'helpers/http.dart'; |
37 | 30 | 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 |
| -} |
0 commit comments