ObjC can do this by making as many methods as needed, one with the optional parameter and one without. This is more complex when there are multiple [Optional] parameters. We will need to step up through the optional parameters making a new method as we add one to the end.
For what it's worth, when I added support for the [Optional] parameter in CodeGeneratorJS.pm, the first argument marked [Optional] in the args list would make all subsequent args (to the right) implicitly optional (even without the [Optional] designation) since JavaScript has neither strongly-typed nor named parameters. This is the way it's currently implemented in CodeGeneratorJS.pm.
The Objective-C DOM API is not being generated automatically anymore.