Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,10 @@ CryptoKey[JC] val usages: js.Array[KeyUsage]
CryptoKeyPair[JT] val privateKey: CryptoKey
CryptoKeyPair[JT] val publicKey: CryptoKey
CustomElementRegistry[JC] def define(name: String, constructor: js.Dynamic, options: ElementDefinitionOptions?): Unit
CustomElementRegistry[JC] def get(name: String): js.Dynamic
CustomElementRegistry[JC] def getName(constructor: js.Dynamic): String
CustomElementRegistry[JC] def upgrade(root: Node): Unit
CustomElementRegistry[JC] def whenDefined(name: String): js.Promise[Any]
CustomEvent[JC] def bubbles: Boolean
CustomEvent[JC] def cancelBubble: Boolean
CustomEvent[JC] def cancelable: Boolean
Expand Down
4 changes: 4 additions & 0 deletions api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,10 @@ CryptoKey[JC] val usages: js.Array[KeyUsage]
CryptoKeyPair[JT] val privateKey: CryptoKey
CryptoKeyPair[JT] val publicKey: CryptoKey
CustomElementRegistry[JC] def define(name: String, constructor: js.Dynamic, options: ElementDefinitionOptions?): Unit
CustomElementRegistry[JC] def get(name: String): js.Dynamic
CustomElementRegistry[JC] def getName(constructor: js.Dynamic): String
CustomElementRegistry[JC] def upgrade(root: Node): Unit
CustomElementRegistry[JC] def whenDefined(name: String): js.Promise[Any]
CustomEvent[JC] def bubbles: Boolean
CustomEvent[JC] def cancelBubble: Boolean
CustomEvent[JC] def cancelable: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ import scala.scalajs.js.annotation._

/** 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
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
* https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry

*/
@js.native
@JSGlobal
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

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

def upgrade(root: Node): Unit

def whenDefined(name: String): js.Promise[Any]
Copy link
Member

@armanbilge armanbilge Mar 20, 2024

Choose a reason for hiding this comment

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

Please copy the doc from here.

Suggested change
def whenDefined(name: String): js.Promise[Any]
def whenDefined(name: String): js.Promise[js.Dynamic]

}