ReSpec (which I'm assuming you're using since I see the stylesheet and some artefacts) doesn't recognise [Optional], and in fact my understanding is that it's been dropped from WebIDL a while back. There is now an "optional" keyword for that. I think you want:
boolean clearData (optional DOMString type);
Note that you can also skip the "in" since WebIDL doesn't have out or inout. (You can also tell ReSpec not to generate it by setting NoIDLIn to true — this might become the default at some point since it makes more sense).