Re: [w3ctag/design-reviews] Invokers API (Issue #920)

 > Is there a way to detect that this feature exists?
 
 Checking if an element has an `invokeTargetElement` property could be used as a feature detection mechanism.
 
> Why is there no generic .invoke() method for invocation targets? If targets have default action (called "auto"?) this might make it more ergonomic for authors rather than needing to work out how to achieve an action.

While this is possible it would be potentially superfluous, popovers already have a togglePopover() function for example. It has been considered that actions should have a corresponding JS API though but idk if it makes sense to have the two go hand in hand always.


 > Why does <details> have "toggle" and "auto" actions doing the same thing?
 
 Auto is the missing value default for the invokeaction attribute. `toggle' is just an explicit token for said action in the details case.
 
 > Why does the <dialog> "toggle" action do the same thing as "cancel"?
 
 Apologies this is a mistake in the explainer.
 
 > Is there a polyfill planned?

https://github.com/keithamus/invokers-polyfill



-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/920#issuecomment-1965348992
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/920/1965348992@github.com>

Received on Monday, 26 February 2024 21:44:33 UTC