Skip to content

Commit

Permalink
fix unresolved dartdoc links (#200)
Browse files Browse the repository at this point in the history
* fix unresolved dartdoc links

* update after merge

* review feedback
  • Loading branch information
devoncarew authored Mar 12, 2024
1 parent 686827a commit 2f13cd5
Show file tree
Hide file tree
Showing 30 changed files with 2,180 additions and 1,807 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
treated like non-object literal `external` constructors.
- Update the docs for generated interface types to reference the MDN Web Docs
project.
- Address several broken links in API documentation.

## 0.5.1

Expand Down
4 changes: 2 additions & 2 deletions lib/src/dom/clipboard_apis.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ extension type ClipboardEventInit._(JSObject _) implements EventInit, JSObject {
/// The **`ClipboardEvent`** interface of the
/// [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API)
/// represents events providing information related to modification of the
/// clipboard, that is [Element/cut_event], [Element/copy_event], and
/// [Element/paste_event] events.
/// clipboard, that is [Element.cut_event], [Element.copy_event], and
/// [Element.paste_event] events.
///
/// ---
///
Expand Down
10 changes: 5 additions & 5 deletions lib/src/dom/credential_management.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ extension type CredentialsContainer._(JSObject _) implements JSObject {
/// uses `get()` to authenticate or provide additional factors during MFA
/// with public key credentials (based on asymmetric cryptography).
/// - The [Federated Credential Management (FedCM)
/// API](/en-US/docs/Web/API/FedCM_API) uses `get()` to authenticate with
/// federated identity providers (IdPs).
/// API](https://developer.mozilla.org/en-US/docs/Web/API/FedCM_API) uses
/// `get()` to authenticate with federated identity providers (IdPs).
/// - The
/// [WebOTP API](https://developer.mozilla.org/en-US/docs/Web/API/WebOTP_API)
/// uses `get()` to request retrieval of a one-time password (OTP) from a
Expand Down Expand Up @@ -229,9 +229,9 @@ extension type PasswordCredentialData._(JSObject _)
/// federated identity provider framework.
///
/// > **Note:** The [Federated Credential Management API
/// > (FedCM)](/en-US/docs/Web/API/FedCM_API) provides a more complete solution
/// > for handling identity federation in the browser, and uses the
/// > [IdentityCredential] type.
/// > (FedCM)](https://developer.mozilla.org/en-US/docs/Web/API/FedCM_API)
/// > provides a more complete solution for handling identity federation in the
/// > browser, and uses the [IdentityCredential] type.
///
/// In browsers that support it, an instance of this interface may be passed in
/// the `credential` member of the `init` object for global [fetch].
Expand Down
2 changes: 1 addition & 1 deletion lib/src/dom/css_font_loading.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extension type FontFace._(JSObject _) implements JSObject {
/// resolves with the current `FontFace` object.
///
/// If the `source` for the font face was specified as binary data, or the
/// font [FontFace/status] property of the font face is anything other than
/// font [FontFace.status] property of the font face is anything other than
/// `unloaded`, then this method does nothing.
external JSPromise<FontFace> load();
external set family(String value);
Expand Down
61 changes: 32 additions & 29 deletions lib/src/dom/css_typed_om.dart
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ extension type CSSMathValue._(JSObject _) implements CSSNumericValue, JSObject {
/// [CSSNumericValue.toSum] on [CSSNumericValue].
///
/// A CSSMathSum is the object type returned when the
/// [`StylePropertyMapReadOnly.get()`](/en-US/docs/Web/API/StylePropertyMapReadOnly/get)
/// [`StylePropertyMapReadOnly.get()`](https://developer.mozilla.org/en-US/docs/Web/API/StylePropertyMapReadOnly/get)
/// method is used on a CSS property whose value is created with a
/// [`calc()`](/en-US/docs/Web/CSS/calc) function.
/// [`calc()`](https://developer.mozilla.org/en-US/docs/Web/CSS/calc) function.
///
/// ---
///
Expand Down Expand Up @@ -452,9 +452,9 @@ extension type CSSTransformComponent._(JSObject _) implements JSObject {
}

/// The **`CSSTranslate`** interface of the represents the
/// [translate()](/en-US/docs/Web/CSS/transform-function/translate) value of the
/// individual `transform` property in CSS. It inherits properties and methods
/// from its parent [CSSTransformValue].
/// [translate()](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate)
/// value of the individual `transform` property in CSS. It inherits properties
/// and methods from its parent [CSSTransformValue].
///
/// ---
///
Expand Down Expand Up @@ -504,10 +504,11 @@ extension type CSSRotate._(JSObject _)
}

/// The **`CSSScale`** interface of the represents the
/// [scale()](/en-US/docs/Web/CSS/transform-function/scale) and
/// [scale3d()](/en-US/docs/Web/CSS/transform-function/scale3d) values of the
/// individual `transform` property in CSS. It inherits properties and methods
/// from its parent [CSSTransformValue].
/// [scale()](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale)
/// and
/// [scale3d()](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale3d)
/// values of the individual `transform` property in CSS. It inherits properties
/// and methods from its parent [CSSTransformValue].
///
/// ---
///
Expand All @@ -531,8 +532,8 @@ extension type CSSScale._(JSObject _)

/// The **`CSSSkew`** interface of the is part of the [CSSTransformValue]
/// interface. It represents the
/// [`skew()`](/en-US/docs/Web/CSS/transform-function/skew) value of the
/// individual `transform` property in CSS.
/// [`skew()`](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skew)
/// value of the individual `transform` property in CSS.
///
/// ---
///
Expand All @@ -552,9 +553,9 @@ extension type CSSSkew._(JSObject _)
}

/// The **`CSSSkewX`** interface of the represents the
/// [`skewX()`](/en-US/docs/Web/CSS/transform-function/skewX) value of the
/// individual `transform` property in CSS. It inherits properties and methods
/// from its parent [CSSTransformValue].
/// [`skewX()`](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skewX)
/// value of the individual `transform` property in CSS. It inherits properties
/// and methods from its parent [CSSTransformValue].
///
/// ---
///
Expand All @@ -569,9 +570,9 @@ extension type CSSSkewX._(JSObject _)
}

/// The **`CSSSkewY`** interface of the represents the
/// [`skewY()`](/en-US/docs/Web/CSS/transform-function/skewY) value of the
/// individual `transform` property in CSS. It inherits properties and methods
/// from its parent [CSSTransformValue].
/// [`skewY()`](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skewY)
/// value of the individual `transform` property in CSS. It inherits properties
/// and methods from its parent [CSSTransformValue].
///
/// ---
///
Expand All @@ -586,9 +587,9 @@ extension type CSSSkewY._(JSObject _)
}

/// The **`CSSPerspective`** interface of the represents the
/// [perspective()](/en-US/docs/Web/CSS/transform-function/perspective) value of
/// the individual `transform` property in CSS. It inherits properties and
/// methods from its parent [CSSTransformValue].
/// [perspective()](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/perspective)
/// value of the individual `transform` property in CSS. It inherits properties
/// and methods from its parent [CSSTransformValue].
///
/// ---
///
Expand All @@ -603,10 +604,11 @@ extension type CSSPerspective._(JSObject _)
}

/// The **`CSSMatrixComponent`** interface of the represents the
/// [matrix()](/en-US/docs/Web/CSS/transform-function/matrix) and
/// [matrix3d()](/en-US/docs/Web/CSS/transform-function/matrix3d) values of the
/// individual `transform` property in CSS. It inherits properties and methods
/// from its parent [CSSTransformValue].
/// [matrix()](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix)
/// and
/// [matrix3d()](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d)
/// values of the individual `transform` property in CSS. It inherits properties
/// and methods from its parent [CSSTransformValue].
///
/// ---
///
Expand Down Expand Up @@ -634,11 +636,12 @@ extension type CSSMatrixComponentOptions._(JSObject _) implements JSObject {
/// represents values for properties that take an image, for example , , or .
///
/// The CSSImageValue object represents an
/// [`<image>`](/en-US/docs/Web/CSS/image) that involves a URL, such as
/// [`url()`](/en-US/docs/Web/CSS/url) or
/// [`image()`](/en-US/docs/Web/CSS/image), but not
/// [`linear-gradient()`](/en-US/docs/Web/CSS/gradient/linear-gradient) or
/// [`element()`](/en-US/docs/Web/CSS/element).
/// [`<image>`](https://developer.mozilla.org/en-US/docs/Web/CSS/image) that
/// involves a URL, such as
/// [`url()`](https://developer.mozilla.org/en-US/docs/Web/CSS/url) or
/// [`image()`](https://developer.mozilla.org/en-US/docs/Web/CSS/image), but not
/// [`linear-gradient()`](https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient)
/// or [`element()`](https://developer.mozilla.org/en-US/docs/Web/CSS/element).
///
/// ---
///
Expand Down
52 changes: 27 additions & 25 deletions lib/src/dom/dom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ typedef XPathNSResolver = JSFunction;
typedef ShadowRootMode = String;
typedef SlotAssignmentMode = String;

/// The **`Event`** interface represents an event which takes place in the DOM.
/// The **`Event`** interface represents an event which takes place on an
/// [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget).
///
/// An event can be triggered by the user action e.g. clicking the mouse button
/// or tapping keyboard, or generated by APIs to represent the progress of an
/// asynchronous task. It can also be triggered programmatically, such as by
/// calling the [`HTMLElement.click()`](/en-US/docs/Web/API/HTMLElement/click)
/// calling the
/// [`HTMLElement.click()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click)
/// method of an element, or by defining the event, then sending it to a
/// specified target using
/// [`EventTarget.dispatchEvent()`](/en-US/docs/Web/API/EventTarget/dispatchEvent).
/// [`EventTarget.dispatchEvent()`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent).
///
/// There are many types of events, some of which use other interfaces based on
/// the main `Event` interface. `Event` itself contains the properties and
Expand All @@ -50,12 +52,12 @@ typedef SlotAssignmentMode = String;
/// are usually connected (or "attached") to various
/// [HTML elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element)
/// (such as `<button>`, `<div>`, `<span>`, etc.) using
/// [`EventTarget.addEventListener()`](/en-US/docs/Web/API/EventTarget/addEventListener),
/// [`EventTarget.addEventListener()`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener),
/// and this generally replaces using the old HTML
/// [event handler attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes).
/// Further, when properly added, such handlers can also be disconnected if
/// needed using
/// [`removeEventListener()`](/en-US/docs/Web/API/EventTarget/removeEventListener).
/// [`removeEventListener()`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener).
///
/// > **Note:** One element can have several such handlers, even for the exact
/// > same event—particularly if separate, independent code modules attach them,
Expand Down Expand Up @@ -343,8 +345,8 @@ extension type EventTarget._(JSObject _) implements JSObject {
/// > same listener, and vice versa.
///
/// Event listeners can also be removed by passing an [AbortSignal] to an
/// [EventTarget/addEventListener] and then later calling
/// [AbortController/abort] on the controller owning the signal.
/// [EventTarget.addEventListener] and then later calling
/// [AbortController.abort] on the controller owning the signal.
external void removeEventListener(
String type,
EventListener? callback, [
Expand All @@ -359,7 +361,7 @@ extension type EventTarget._(JSObject _) implements JSObject {
/// dispatched manually with `dispatchEvent()`.
///
/// Calling `dispatchEvent()` is the last step to _firing an event_. The event
/// should have already been created and initialized using an [Event/Event]
/// should have already been created and initialized using an [Event.Event]
/// constructor.
///
/// > **Note:** When calling this method, the [Event.target] property is
Expand Down Expand Up @@ -696,7 +698,7 @@ extension type Node._(JSObject _) implements EventTarget, JSObject {
/// including intrinsic (inline) listeners. It does _not_ copy event listeners
/// added
/// using
/// [`addEventListener()`](/en-US/docs/Web/API/EventTarget/addEventListener)
/// [`addEventListener()`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
/// or
/// those assigned to element properties (e.g., `node.onclick =
/// someFunction`).
Expand Down Expand Up @@ -730,7 +732,7 @@ extension type Node._(JSObject _) implements EventTarget, JSObject {

/// The **`isSameNode()`** method of the [Node] interface
/// is a legacy alias the [for the `===` strict equality
/// operator](/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality).
/// operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality).
/// That is, it tests whether two nodes are the same
/// (in other words, whether they reference the same object).
///
Expand Down Expand Up @@ -973,8 +975,8 @@ extension type Document._(JSObject _) implements Node, JSObject {
/// When called on
/// the [document] object, the complete document is searched, including the
/// root node. You may also call [Element.getElementsByClassName] on any
/// element; it will return only elements which are
/// descendants of the specified root element with the given class name(s).
/// element; it will return only elements which are descendants of the
/// specified root element with the given class name(s).
///
/// > **Warning:** This is a live [HTMLCollection]. Changes in the DOM will
/// > reflect in the array as the changes occur. If an element selected by
Expand Down Expand Up @@ -1048,11 +1050,11 @@ extension type Document._(JSObject _) implements Node, JSObject {
]);

/// **`Document.adoptNode()`** transfers a from another [Document] into the
/// method's
/// document. The adopted node and its subtree are removed from their original
/// document (if
/// any), and their [Node.ownerDocument] is changed to the
/// current document. The node can then be inserted into the current document.
/// method's document.
/// The adopted node and its subtree are removed from their original document
/// (if any), and their [Node.ownerDocument] is changed to the current
/// document.
/// The node can then be inserted into the current document.
external Node adoptNode(Node node);

/// The **`Document.createAttribute()`** method creates a new
Expand Down Expand Up @@ -1226,7 +1228,7 @@ extension type Document._(JSObject _) implements Node, JSObject {
/// `copy`) can work without an editable element.
///
/// > **Note:** Modifications performed by `execCommand()` may or may not
/// > trigger [Element/beforeinput_event] and [Element/input_event] events,
/// > trigger [Element.beforeinput_event] and [Element.input_event] events,
/// > depending on the browser and configuration. If triggered, the handlers
/// > for the events will run before `execCommand()` returns. Authors need to
/// > be careful about such recursive calls, especially if they call
Expand Down Expand Up @@ -2164,7 +2166,7 @@ extension type Element._(JSObject _) implements Node, JSObject {
/// lower-cases the argument before searching for it. This is undesirable when
/// trying to
/// match SVG elements (such as
/// [`<linearGradient>`](/en-US/docs/Web/SVG/Element/linearGradient))
/// [`<linearGradient>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient))
/// in an HTML document. Instead, use [Element.getElementsByTagNameNS],
/// which preserves the capitalization of the tag name.
///
Expand Down Expand Up @@ -2216,7 +2218,7 @@ extension type Element._(JSObject _) implements Node, JSObject {
/// pointer will
/// be targeted at the capture element until capture is released (via
/// [Element.releasePointerCapture] or the
/// [Element/pointerup_event] event is fired).
/// [Element.pointerup_event] event is fired).
///
/// > **Note:** Pointer capture will cause the target to capture all
/// > subsequent pointer events as if they were occurring over the capturing
Expand Down Expand Up @@ -2581,23 +2583,23 @@ extension type CharacterData._(JSObject _) implements Node, JSObject {
/// `CharacterData` node.
///
/// Strings are inserted as [Text] nodes; the string is being passed as
/// argument to the [Text/Text] constructor.
/// argument to the [Text.Text] constructor.
external void before(JSAny nodes);

/// The **`after()`** method of the [CharacterData] interface
/// inserts a set of [Node] objects or strings in the children list of the
/// object's parent, just after the object itself.
///
/// Strings are inserted as [Text] nodes; the string is being passed as
/// argument to the [Text/Text] constructor.
/// argument to the [Text.Text] constructor.
external void after(JSAny nodes);

/// The **`replaceWith()`** method of the [CharacterData] interface
/// replaces this node in the children list of its parent
/// with a set of [Node] objects or string.
///
/// Strings are inserted as [Text] nodes; the string is being passed as
/// argument to the [Text/Text] constructor.
/// argument to the [Text.Text] constructor.
external void replaceWith(JSAny nodes);

/// The **`remove()`** method of the [CharacterData] removes the text
Expand Down Expand Up @@ -2828,8 +2830,8 @@ extension type StaticRange._(JSObject _) implements AbstractRange, JSObject {
/// contain nodes and parts of text nodes.
///
/// A range can be created by using the [Document.createRange] method. Range
/// objects can also be retrieved by using the [Selection/getRangeAt] method of
/// the [Selection] object or the [Document/caretRangeFromPoint] method of the
/// objects can also be retrieved by using the [Selection.getRangeAt] method of
/// the [Selection] object or the [Document.caretRangeFromPoint] method of the
/// [Document] object.
///
/// There also is the [Range.Range] constructor available.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/dom/encrypted_media.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ extension type MediaKeyMessageEventInit._(JSObject _)
/// The **`MediaEncryptedEvent`** interface of the
/// [Encrypted Media Extensions API](https://developer.mozilla.org/en-US/docs/Web/API/Encrypted_Media_Extensions_API)
/// contains the information associated with an
/// [HTMLMediaElement/encrypted_event] event sent to a [HTMLMediaElement] when
/// [HTMLMediaElement.encrypted_event] event sent to a [HTMLMediaElement] when
/// some initialization data is encountered in the media.
///
/// ---
Expand Down
Loading

0 comments on commit 2f13cd5

Please sign in to comment.