Akasha is a typed browser API layer that is always up to date with the latest web specifications.
Several significant changes have been made since the 0.17 announced to this group. The major changes include:
- The ability to test for features before using the feature using methods such as WindowGlobal.isIndexedDBSupported(). The feature tests can be done dynamically at runtime or statically at compile-time. If done at compile time then the code can be compiled assuming that the feature is present or absent.
- Global execution contexts other than "window" are natively supported. From a practical perspective this means it is relatively easy to use Akasha to write service workers and access the globals via ServiceWorkerGlobal. Similarly there exists AudioWorkletGlobal and DedicatedWorkerGlobal etc. Within a GWT application, these global execution contexts may still require custom linkers but are much easier to write.
Other changes since the 0.17 release:
- Update the
WebGPUspec to theW3C Working Draft, 10 September 2021version. This update resulted in a few minor name changes (i.e. theGPURequestAdapterOptions.forceSoftwaremember was renamed toGPURequestAdapterOptions.forceFallbackAdapter,GPUAdapter.isSoftwarewas renamed toGPUAdapter.isFallbackAdapter) as well as improved modelling of the types that contain constants (i.e.GPUMapModeno longer extendsJsObjectand is a final class in the java binding). - Update the
Permissionsspec to theW3C Working Draft 07 September 2021version. This update resulted in a few minor changes to thePermissionsNameenumeration, the addition of thenameattribute to thePermissionStatustype and the removal of the (unused)PermissionSetParameters. - Update the
WebCodecsspec to theW3C Working Draft, 8 September 2021version. This update resulted in many changes across several types. See the API diff for further details. - Migrate artifacts generated from the
WebCodecsspec to the packagecodecsin the java binding. - Update the
Visual Viewport APIspec to theDraft Community Group Report 10 September 2021version. This update resulted in theVisualViewport.segmentsattribute being made optional (or Nullable in the java binding). - Update the
Web Share APIspec to theW3C Working Draft 03 September 2021version. This update resulted in the addition of theNavigator.canShare(...)operation. - Update the
WebXR Device APIspec to theW3C Working Draft, 24 August 2021version. This update resulted in several changes, check the API diff for further details. - Update the
HTML Living Standardspec to the11 September 2021version. This update resulted in several changes, check the API diff for further details. The most significant changes were the addition ofoncontextlostandoncontextrestoredmessage handlers to several types and the addition ofisContextLost()to contexts as appropriate. - Updates across several specifications resulted in
PostMessageOptionsbeing renamed toStructuredSerializeOptions. - Re-fetch the entire set of specifications ensuring that the required members in dictionaries appear in declaration order as initiated in version
v0.15. This has resulted in the reordering of parameters increate()methods in the java binding to represent members in declaration order. This impacted the following types at a minimum:StaticRangeInit,XRInputSourcesChangeEventInit,RTCRtpCodecCapability,RTCRtpCodecParameters,RTCRtpContributingSource,RTCRtpHeaderExtensionParameters,RTCRtpParameters,RTCRtpSendParameters,RTCStats,RTCTrackEventInit,HkdfParams,Pbkdf2Params,AllowedBluetoothDevice,AudioProcessingEventInit,IIRFilterOptions,OfflineAudioContextOptions(as well as several other less used dictionaries) - Rename several union types to reflect intent, migrate the unions to the java package where they are used and convert unions to marker interfaces where appropriate. i.e. The union type
IDBObjectStoreOrIDBIndexUnionwas renamed toIDBCursorSource, converted to a marker interface and migrated to theakasha.idbjava package. See the API diff for a full list of unions migrated. - Type the
AudioTrack.kindattribute as an enumeration containing the set of valid values. - Add the
Resize Observerspec atW3C First Public Working Draft, 11 February 2020version to the set of specs that are used to generate the browser API. This added theResizeObservertype and related infrastructure. - Generate static types for global execution contexts of a service worker (i.e.
SharedWorkerGlobal), a worker (i.e.DedicatedWorkerGlobal), a shared worker (i.e.SharedWorkerGlobal) and audio worklets (i.e.AudioWorkletGlobal). - Change the way the java binding generates unions so that methods of the form
as[X]()andis[X]()exist for every component typeXthat is part of the union. - Replace usages of
@javax.annotations.Nullablewith@jsinterop.annotations.JsNullableand@javax.annotations.Nonnullwith@jsinterop.annotations.JsNonNullon natively exposed elements to provide additional guidance to the J2CL/closure compiler variant of the java binding. - Add event handling code to types (i.e.
addXListener(...)andremoveXListener(...)methods etc.) to more types and more events. The types and associated events as follows:- AbstractWorker:
error - Animation:
cancelfinishremove - AudioWorkletNode:
processorerror - BaseAudioContext:
statechange - Element:
clickcontextmenu - EventSource:
error - GlobalEventHandlers:
abortanimationcancelanimationendanimationiterationanimationstartauxclickbeforeinputblurcancelcanplaycanplaythroughchangeclickclosecompositionendcompositionstartcompositionupdatecontextmenucuechangedblclickdragdragenddragenterdragexitdragleavedragoverdragstartdropdurationchangeemptiedendederrorfocusfocusinfocusoutgotpointercaptureinputinvalidkeydownkeypresskeyuploadloadeddataloadedmetadataloadstartlostpointercapturemousedownmouseentermouseleavemousemovemouseoutmouseovermouseuppauseplayplayingpointercancelpointerdownpointerenterpointerleavepointermovepointeroutpointeroverpointerupprogressratechangeresetresizescrollsecuritypolicyviolationseekedseekingselectselectionchangeselectstartstalledsubmitsuspendtimeupdatetoggletouchcanceltouchendtouchmovetouchstarttransitioncanceltransitionendtransitionruntransitionstartvolumechangewaitingwheel - HTMLCanvasElement:
contextlostcontextrestored - IDBDatabase:
versionchange - MediaDevices:
devicechange - MediaKeySession:
keystatuseschangemessage - MediaQueryList:
change - MediaSource:
sourceclosesourceendedsourceopen - Notification:
clickcloseerrorshow - OffscreenCanvas:
contextlostcontextrestored - PermissionStatus:
change - RTCDtlsTransport:
errorstatechange - ScreenOrientation:
change - ServiceWorkerContainer:
controllerchangemessageerror - ServiceWorkerGlobalScope:
canmakepaymentfetchmessageerrornotificationclosepaymentrequestsync - ServiceWorkerRegistration:
updatefound - SourceBuffer:
aborterrorupdateupdateendupdatestart - SourceBufferList:
addsourcebufferremovesourcebuffer - TextTrackCue:
enterexit - TextTrackList:
removetrack - WindowEventHandlers:
afterprintbeforeprintbeforeunloadhashchangelanguagechangemessagemessageerrorofflineonlinepagehidepageshowpopstaterejectionhandledstorageunhandledrejectionunload - WorkerGlobalScope:
offlineonlinerejectionhandledunhandledrejection - XMLHttpRequestEventTarget:
aborterrorloadloadendloadstartprogresstimeout
- AbstractWorker:
- Move the classes
IDBObjectStoreOrIDBIndexUnionandIDBObjectStoreOrIDBIndexOrIDBCursorUnionfrom theakasha.indexdbpackage to theakasha.idbpackage. This was done to align with the rename ofindexDBpackage that occurred prior to the initial release of akasha. - Annotate several synthesized unions with the
@org.jetbrains.annotations.ApiStatus.Internalannotation to make it clear that these types should not be used in user code. IntelliJ IDE will also generate a warning if user code interacts directly with internal types. - Ensure that the
codeparameter toGPUShaderModuleDescriptor.create()is annotated with@WGSL. - Replace usages of
goog.globalwith$wndin the GWT variant. If there is an error while the GWT application is initializing or Akasha is used early in the initialization process, there was previously a period wheregoog.globalhad not been assigned and thus the Akasha code would generate errors when using the symbol. This change eliminated this possibility. - Start generating
@JsOverlaymethods of the formboolean isXSupported()for features that may be optional in an implementation. This allows downstream libraries to detect whether a feature is present before making use of the feature. The feature detection can be done at run time or at compile time depending on the needs of the application. The default behaviour of feature detection methods are to perform the checks at runtime, however this can be be changed by defining an appropriately named property in closure compiler to eithertrueorfalsewhen using the J2CL variant or setting the equivalent binding property when using the GWT variant. The name of the property is derived from the symbol that is feature detected. Feature detection methods added and the associated compile time properties include:Navigator.isBluetoothSupported()with a propertyakasha.is__Navigator_bluetooth__supportedNavigator.isGpuSupported()with a propertyakasha.is__Navigator_gpu__supportedWindow.isLocalStorageSupported()andWindowGlobal.isLocalStorageSupported()with a propertyakasha.is__Window_localStorage__supportedWindow.isIndexedDBSupported()andWindowGlobal.isIndexedDBSupported()with a propertyakasha.is__Window_indexedDB__supportedWindow.isSessionStorageSupported()andWindowGlobal.isSessionStorageSupported()with a propertyakasha.is__Window_sessionStorage__supportedWindow.isSpeechSynthesisSupported()andWindowGlobal.isSpeechSynthesisSupported()with a propertyakasha.is__Window_speechSynthesis__supportedNavigator.isClipboardSupported()with a propertyakasha.is__Navigator_clipboard__supportedNavigator.isCredentialsSupported()with a propertyakasha.is__Navigator_credentials__supportedNavigator.isGeolocationSupported()with a propertyakasha.is__Navigator_geolocation__supportedNavigator.isGetGamepadsSupported()with a propertyakasha.is__Navigator_isGetGamepadsSupported__supportedNavigator.isMediaDevicesSupported()with a propertyakasha.is__Navigator_mediaDevices__supportedNavigator.isPermissionsSupported()with a propertyakasha.is__Navigator_permissions__supportedNavigator.isRequestMediaKeySystemAccessSupported()with a propertyakasha.is__Navigator_requestMediaKeySystemAccess__supportedNavigator.isSendBeaconSupported()with a propertyakasha.is__Navigator_sendBeacon__supportedNavigator.isServiceWorkerSupported()with a propertyakasha.is__Navigator_serviceWorker__supportedNavigator.isShareSupported()with a propertyakasha.is__Navigator_share__supportedNavigator.isVibrateSupported()with a propertyakasha.is__Navigator_vibrate__supportedNavigator.isWakeLockSupported()with a propertyakasha.is__Navigator_wakeLock__supportedNavigator.isXrSupported()with a propertyakasha.is__Navigator_xr__supported
- Move the
akasha.StringOrLongLongUniontype toakasha.core.StringOrLongLongUnionas it is only used by theakasha.core.JSONtype. - Add initial support for the
akasha:webgpu-j2clartifact which is an Elemental2 compatible variant of the WebGPU specification. - Remove the
TrustedScriptsymbol from the externs generated for theakasha:j2clartifact as it is no longer required with more recent versions of the closure compiler.
To learn more about Akasha and get started:
https://github.com/akasha/akasha Thanks!
The Akasha Team
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/CACiKNc76uy%2B1OEo1v%3DzsRdKkFm%3Doh%3D34_mj54JAFB9Z9Wja6uQ%40mail.gmail.com.
No comments:
Post a Comment