Comments (6)
An alternative would be something like:
class MyCustomElement {
static form = true;
}
Similar to formAssociated
. Then elementInternals
could be used to configure form behaviour.
from html.
+1 to this - it seems like most of the UI toolkits built on Custom Elements have had to work around this, often by "patching" fields within shadow boundaries into FormData via the formdata
event - tricky to do correctly for arbitrary input types (esp files).
from html.
So how would the .form getter work for the slotted elements?
from html.
I wonder if Custom Attributes (WICG/webcomponents#1029) would solve for your usecase?
from html.
@keithamus I don't think so. This would be a custom element with potential UI in a shadow root.
from html.
So how would the .form getter work for the slotted elements?
Good point. I guess that answer is much easier in the alternative idea #10220 (comment), since it would just be the custom element.
from html.
Related Issues (20)
- Standardize marquee UA styles. HOT 2
- Improve handling of malformed unicode bidi control characters HOT 2
- navigable's "is delaying load events" is not reset when navigation aborted
- A way to detect environment such as Workers HOT 2
- Upcoming WHATNOT meeting on 4/11/2024 HOT 1
- Upgrade `structuredClone` options object with `skipNotSerializable` to avoid cloning exceptions
- navigator.cookieEnabled in third-party contexts HOT 10
- intercepting same-document navigation caused by a user' direct address input in browser address bar HOT 4
- Why does the handle attribute changes algorithm of popover associate with all HTML elements HOT 5
- "scripts may run for the newly-created document" never updated for about:blank iframes. HOT 2
- Can messageerror fire on Worker? HOT 4
- ECMAScript's OrdinaryFunctionCreate has another new parameter HOT 2
- Allow slotting indirect children HOT 12
- Not clear purpose of early return in "finalize a same-document navigation"
- Upcoming WHATNOT meeting on 4/18/2024 HOT 4
- Module script dependencies and fetch priority
- Proposal: AI Task Meta Tag HOT 1
- Proposal: <more> element HOT 3
- Proposal: <more> element inside <ul>, <ol>, <menu> (or possibly also inside some other elements) HOT 3
- Proposal: getHTML() for Document interface HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html.