Closed
Description
registerPaint
takes a constructor function and immediately invokes it. If this is really what we want, then it might as well just take an instance, not a constructor (strictly more flexible).
Talking to @esprehn, he says the point of taking a constructor was to allow the class to maintain state (eg. caches) which the UA gets to control the lifetime of (eg. discarding when there's nothing present in the document or maybe visible on the page that will use the painter). That makes a lot of sense.
But if that's what we want to allow, the spec should probably be written that way now, since it's not necessarily compatible (eg. developers could depend on registerPaint
invoking the constructor, and it not getting invoked at other times).