-
Notifications
You must be signed in to change notification settings - Fork 31
Deprecate a few more things before we launch v2 #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,7 @@ extension HTMLCanvasElementGlue on HTMLCanvasElement { | |
} | ||
|
||
extension CanvasRenderingContext2DGlue on CanvasRenderingContext2D { | ||
@Deprecated('See CanvasRenderingContext2D.drawImage') | ||
void drawImageScaled( | ||
CanvasImageSource image, | ||
double dx, | ||
|
@@ -70,6 +71,7 @@ extension CanvasRenderingContext2DGlue on CanvasRenderingContext2D { | |
} | ||
kevmoo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
extension NodeGlue on Node { | ||
@Deprecated('See Node.textContent') | ||
set text(String s) => textContent = s; | ||
Comment on lines
+74
to
75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding a more descriptive message to the deprecation annotation, explaining why
|
||
@Deprecated('See Node.appendChild()') | ||
Node append(Node other) => appendChild(other); | ||
|
@@ -98,7 +100,9 @@ extension TouchGlue on Touch { | |
} | ||
|
||
extension StorageGlue on Storage { | ||
@Deprecated('Use Storage.getItem instead') | ||
String? operator [](String key) => getItem(key); | ||
Comment on lines
+103
to
104
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the previous comment, adding a more descriptive message to the deprecation annotation for
|
||
@Deprecated('Use Storage.setItem instead') | ||
void operator []=(String key, String value) => setItem(key, value); | ||
Comment on lines
+105
to
106
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above, adding a more descriptive message to the deprecation annotation for
|
||
} | ||
|
||
|
@@ -119,9 +123,8 @@ extension XMLHttpRequestGlue on XMLHttpRequest { | |
// from Closure's goog.net.Xhrio.getResponseHeaders. | ||
final headers = <String, String>{}; | ||
final headersString = getAllResponseHeaders(); | ||
final headersList = | ||
LineSplitter.split(headersString).where((header) => header.isNotEmpty); | ||
for (final header in headersList) { | ||
for (final header in LineSplitter.split(headersString) | ||
kevmoo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.where((header) => header.isNotEmpty)) { | ||
final split = header.split(': '); | ||
if (split.length <= 1) { | ||
continue; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be helpful to include the reason for deprecation in the changelog entry. This gives users more context as to why the change was made.