Skip to content

Getting rid of optional #905

Open
Open
@annevk

Description

@annevk

If we do #60, should we get rid of optional and instead use defaulting as sole mechanism?

  [NewObject] Document createHTMLDocument(optional DOMString title);

would become

  [NewObject] Document createHTMLDocument(DOMString title = undefined);

and

  void observe(Node target, optional MutationObserverInit options = {});

would become

  void observe(Node target, MutationObserverInit options = {});

(And if you need to distinguish between not given and undefined you use overloading, as XMLHttpRequest does for open().)

cc @saschanaz @tabatkins

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions