Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDeal with exceptions from custom element reaction steps #19265
Comments
|
@jdm Could you point out where is the related code for https://html.spec.whatwg.org/multipage/custom-elements.html#cereactions ? |
|
@tigercosmos the relevant code is in codegen: servo/components/script/dom/bindings/codegen/CodegenRust.py Lines 3258 to 3270 in 36f5b69 |
|
I am not familiar with CodeGen. What's the purpose of CodeGen? Why we use this way?
|
|
The code that is generated by CodeGenRust.py is responsible for:
Since each of these is very repetitive and easy to mess up, we generate lots of very similar code during the build instead of handwriting it. Python code like the one you quote are building up Rust code piece by piece - a CGList is a list of generated code snippets; CGGeneric is just a raw string that will be included in the generated code. |
|
You can find the generated code output for a given |
whatwg/html#3235