[heycam/webidl] Pattern for defining constructors, methods, getters, and setters (#730)

It would be nice if IDL could recommend language to introduce specification-level algorithms. E.g.,

---

```webidl
[Constructor, Exposed=Worker]
interface Example { 
  void test();
  attribute DOMString text;
};
```
The `Example()` constructor, when invoked, must run these steps: ...

The `test()` method, when invoked, must run these steps: ...

The `text` attribute's getter, must run these steps: ...

The `text` attribute's setter, must run these steps: ...

---

(I would still kinda like it if IDL auto-generated abstract operations that specifications would have to define. This would make things completely unambiguous and also give specifications a way to invoke these abstract operations without making it seem like they invoke a public method as they do routinely and wrongly today.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/730

Received on Monday, 27 May 2019 12:38:19 UTC