You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2021. It is now read-only.
I'm working on the CustomEvent to use the typed CustomEvent.detail whichever I want to generate and use. Because it is not clearly typed yet. So that I'd like to add a functor to generate a CustomEvent module with typed detail as below;
moduleOnChangeDetail= {
typet= {
component:string,
valueAsDate:Js.Date.t,
value:string,
};
};moduleNewOnChangeEvent=Webapi.Dom.CustomEvent.MakeEmittedCustomEvent(OnChangeDetail);---
onChange={e => {
Js.log(e->Webapi.Dom.CustomEvent.preventDefault);// still can use as before.Js.log(e->NewOnChangeEvent.preventDefault);// can use from new CustomEventJs.log2("make",NewOnChangeEvent.makeWithOptions("foo", bar));// can make with options..Js.log(e->NewOnChangeEvent.detail.valueAsDate);// typed detail!
}}
Hi, team.
I'm working on the
CustomEventto use the typedCustomEvent.detailwhichever I want to generate and use. Because it is not clearly typed yet. So that I'd like to add a functor to generate a CustomEvent module with typed detail as below;Example to use