documentationfor yFiles for HTML 2.6

Namespaces

In the yFiles for HTML API, types are organized into namespaces. They correspond roughly to namespaces or packages in languages like Java and C#. In JavaScript nested objects hierarchies are used instead.

In the ES module variant of the library, you typically import the types directly and work neither with namespaces, nor the fully-qualified names of the types.

In the UMD variant of the library, each module file exports the same top-level yfiles namespace object.

As a user of the API you don’t need to declare yFiles for HTML namespaces. You also aren’t required to organize your own types into namespaces.

Due to historical reasons, namespaces are created with the yfiles.module() function. These should not be confused with JS Modules or AMD modules. These concepts are independent of each other.