Skip to content

Add upgrade() whenDefined() to CustomElementRegistry #831

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update dom/src/main/scala/org/scalajs/dom/CustomElementRegistry.scala
Co-authored-by: zetashift <[email protected]>
  • Loading branch information
cyz1901 and zetashift authored Mar 6, 2024
commit a3382523aef7620261763c70c6024c22f5b8d6fa
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ abstract class CustomElementRegistry extends js.Object {

def get(name: String): js.Dynamic
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def get(name: String): js.Dynamic
def get(name: String): js.UndefOr[js.Dynamic]


def getName(constructor: js.Dynamic): String
/** Returns the name for a previously-defined custom element.
* @param constructor
* Constructor for the custom element.
*/
def getName(constructor: js.Dynamic): String

/** Defines a new custom element. */
def define(name: String, constructor: js.Dynamic, options: ElementDefinitionOptions = js.native): Unit
Expand Down