Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz1901 committed Mar 6, 2024
1 parent 2b1da95 commit b333d61
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions dom/src/main/scala/org/scalajs/dom/CustomElementRegistry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,23 @@ import scala.scalajs.js.annotation._
@JSGlobal
abstract class CustomElementRegistry extends js.Object {

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

/** Returns the name for a previously-defined custom element.
* @param constructor
* Constructor for the custom element.
*/
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

/** Upgrades a custom element directly, even before it is connected to its shadow root. */
def upgrade(root: Node): Unit

/** 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]
}

0 comments on commit b333d61

Please sign in to comment.