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 upImplement attachInternals and ElementInternals #24988
Comments
|
I'm going to draft some code toward this, although current WPT status (https://wpt.fyi/results/custom-elements/form-associated?run_id=433960003&run_id=401740001&run_id=439870002&run_id=426710002) suggests Servo shouldn't necessarily go too far out of its way to support form-associated CEs yet. |
|
Question: does Servo currently have any sense of remembering what was in a form for when you navigate away from a page and come back to it? If so, where's that implemented? It needs to fire a custom element reaction in some cases if it exists at all, and I'm not sure whether it does. |
|
Now making enough progress that I'm hitting spec/test holes; whatwg/html#5263 |
|
We only retain form information that is reflected in the current DOM in a page in the bfcache (ie. it hasn't been evicted, so we can activate the pipeline). If the page gets reloaded then all form information is lost. |
|
In that case one of the callbacks can be defined but has no code ever firing it; the spec only says we have to fire it if we repopulate form data on a return to a page. |
WPT custom-elements/HTMLElement-attachInternals, custom-elements/ElementInternals-NotSupportedError, custom-elements/form-associated/form-disabled-callback, and all of custom-elements-form-associated/ElementInternals* expect attachInternals to exist, and to return an ElementInternals where appropriate