Add upgrade() whenDefined() to CustomElementRegistry#831
Open
cyz1901 wants to merge 5 commits intoscala-js:mainfrom
Open
Add upgrade() whenDefined() to CustomElementRegistry#831cyz1901 wants to merge 5 commits intoscala-js:mainfrom
cyz1901 wants to merge 5 commits intoscala-js:mainfrom
Conversation
Author
Member
|
Hmm. I think the type for a constructor should be |
Author
Added |
zetashift
requested changes
Mar 4, 2024
Contributor
zetashift
left a comment
There was a problem hiding this comment.
Could use some doc comments, but otherwise looks good to me! (You might have to format my example of doc comments).
Co-authored-by: zetashift <rskaraya@gmail.com>
Co-authored-by: zetashift <rskaraya@gmail.com>
Author
|
fixed |
armanbilge
requested changes
Mar 20, 2024
|
|
||
| /** The CustomElementRegistry interface provides methods for registering custom elements and querying registered | ||
| * elements. To get an instance of it, use the window.customElements property. | ||
| * https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry |
Member
There was a problem hiding this comment.
Suggested change
| * https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry |
| abstract class CustomElementRegistry extends js.Object { | ||
|
|
||
| /** Returns the constructor for a previously-defined custom element. */ | ||
| def get(name: String): js.Dynamic |
Member
There was a problem hiding this comment.
Suggested change
| def get(name: String): js.Dynamic | |
| def get(name: String): js.UndefOr[js.Dynamic] |
armanbilge
reviewed
Mar 20, 2024
| /** Returns an empty Promise that resolves when a custom element becomes defined with the given name. If such a custom | ||
| * element is already defined, the returned promise is immediately fulfilled. | ||
| */ | ||
| def whenDefined(name: String): js.Promise[Any] |
Member
There was a problem hiding this comment.
Please copy the doc from here.
Suggested change
| def whenDefined(name: String): js.Promise[Any] | |
| def whenDefined(name: String): js.Promise[js.Dynamic] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there!
Before submitting a PR containing any Scala changes, please make sure you...
sbt prePRapi-reportsThanks for contributing!
add upgrade() whenDefined() to CustomElementRegistry