Skip to content

Add variadic arguments #343

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

Merged
merged 3 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
## 1.2.0-wip
## 2.0.0-wip
- Added missing `FileReader` event getters: `onAbort`, `onError`, `onLoad`,
`onLoadStart`, `onProgress`.
- Removed renames `UnderlyingSource` and `UnderlyingSourceBase` where the types
- Removed renames `UnderlyingSource` and `UnderlyingSourceBase` where the types
don't exist.
- Fixed generation of variadic arguments to generate 4 optional parameters.

## 1.1.0

- Added `HttpStatus` class that declares http status codes. This is a copy of
- Added `HttpStatus` class that declares http status codes. This is a copy of
the `HttpStatus` from the `dart:_internal` library that's exposed only through
`dart:io` and `dart:html`.
- Added `JSImmutableListWrapper` which helps create a dart list from a JS list.
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/accelerometer.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/angle_instanced_arrays.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/attribution_reporting_api.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/background_sync.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/battery_status.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/clipboard_apis.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/compression.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
79 changes: 65 additions & 14 deletions web/lib/src/dom/console.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down Expand Up @@ -47,35 +47,86 @@ external $Console get console;
@JS('console')
extension type $Console._(JSObject _) implements JSObject {
@JS('assert')
external void assert_(
JSAny? data, [
external void assert_([
bool condition,
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void clear();
external void debug(JSAny? data);
external void error(JSAny? data);
external void info(JSAny? data);
external void log(JSAny? data);
external void debug([
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void error([
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void info([
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void log([
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void table([
JSAny? tabularData,
JSArray<JSString> properties,
]);
external void trace(JSAny? data);
external void warn(JSAny? data);
external void trace([
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void warn([
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void dir([
JSAny? item,
JSObject? options,
]);
external void dirxml(JSAny? data);
external void dirxml([
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void count([String label]);
external void countReset([String label]);
external void group(JSAny? data);
external void groupCollapsed(JSAny? data);
external void group([
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void groupCollapsed([
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void groupEnd();
external void time([String label]);
external void timeLog(
JSAny? data, [
external void timeLog([
String label,
JSAny? data1,
JSAny? data2,
JSAny? data3,
JSAny? data4,
]);
external void timeEnd([String label]);
}
2 changes: 1 addition & 1 deletion web/lib/src/dom/cookie_store.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/credential_management.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/csp.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_animations.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_animations_2.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_cascade.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_cascade_6.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_conditional.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_conditional_5.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_contain.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_counter_styles.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_font_loading.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_fonts.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
9 changes: 7 additions & 2 deletions web/lib/src/dom/css_highlight_api.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down Expand Up @@ -37,7 +37,12 @@ typedef HighlightType = String;
/// API documentation sourced from
/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/Highlight).
extension type Highlight._(JSObject _) implements JSObject {
external factory Highlight(AbstractRange initialRanges);
external factory Highlight([
AbstractRange initialRange1,
AbstractRange initialRange2,
AbstractRange initialRange3,
AbstractRange initialRange4,
]);

/// It is possible to create [Range] objects that overlap in a document.
///
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_masking.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_paint_api.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_properties_values_api.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_transitions.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
2 changes: 1 addition & 1 deletion web/lib/src/dom/css_transitions_2.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
Expand Down
Loading