This tiny example demonstrates the use of Ceylon service providers in the JavaScript environment. Service providers are an abstraction of, and interoperate with, Java's service loaders, but are not tied to the Java platform, and can even work cross-platform.
Usually, the service interface, service provider, and client of the service are defined in two or three separate Ceylon modules. But due to the limitations of the Web IDE, they're all defined in the same module in this example.
Click here to run this code online