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:
Other changes since the 0.17 release:
WebGPU spec to the W3C Working Draft, 10 September 2021 version. This update resulted in a few minor name changes (i.e. the GPURequestAdapterOptions.forceSoftware member was renamed to GPURequestAdapterOptions.forceFallbackAdapter, GPUAdapter.isSoftware was renamed to GPUAdapter.isFallbackAdapter) as well as improved modelling of the types that contain constants (i.e. GPUMapMode no longer extends JsObject and is a final class in the java binding).Permissions spec to the W3C Working Draft 07 September 2021 version. This update resulted in a few minor changes to the PermissionsName enumeration, the addition of the name attribute to the PermissionStatus type and the removal of the (unused) PermissionSetParameters.WebCodecs spec to the W3C Working Draft, 8 September 2021 version. This update resulted in many changes across several types. See the API diff for further details.WebCodecs spec to the package codecs in the java binding.Visual Viewport API spec to the Draft Community Group Report 10 September 2021 version. This update resulted in the VisualViewport.segments attribute being made optional (or Nullable in the java binding).Web Share API spec to the W3C Working Draft 03 September 2021 version. This update resulted in the addition of the Navigator.canShare(...) operation.WebXR Device API spec to the W3C Working Draft, 24 August 2021 version. This update resulted in several changes, check the API diff for further details.HTML Living Standard spec to the 11 September 2021 version. This update resulted in several changes, check the API diff for further details. The most significant changes were the addition of oncontextlost and oncontextrestored message handlers to several types and the addition of isContextLost() to contexts as appropriate.PostMessageOptions being renamed to StructuredSerializeOptions.v0.15. This has resulted in the reordering of parameters in create() 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)IDBObjectStoreOrIDBIndexUnion was renamed to IDBCursorSource, converted to a marker interface and migrated to the akasha.idb java package. See the API diff for a full list of unions migrated.AudioTrack.kind attribute as an enumeration containing the set of valid values.Resize Observer spec at W3C First Public Working Draft, 11 February 2020 version to the set of specs that are used to generate the browser API. This added the ResizeObserver type and related infrastructure.SharedWorkerGlobal), a worker (i.e. DedicatedWorkerGlobal), a shared worker (i.e. SharedWorkerGlobal) and audio worklets (i.e. AudioWorkletGlobal).as[X]() and is[X]() exist for every component type X that is part of the union.@javax.annotations.Nullable with @jsinterop.annotations.JsNullable and @javax.annotations.Nonnull with @jsinterop.annotations.JsNonNull on natively exposed elements to provide additional guidance to the J2CL/closure compiler variant of the java binding.addXListener(...) and removeXListener(...) methods etc.) to more types and more events. The types and associated events as follows:errorcancel finish removeprocessorerrorstatechangeclick contextmenuerrorabort animationcancel animationend animationiteration animationstart auxclick beforeinput blur cancel canplay canplaythrough change click close compositionend compositionstart compositionupdate contextmenu cuechange dblclick drag dragend dragenter dragexit dragleave dragover dragstart drop durationchange emptied ended error focus focusin focusout gotpointercapture input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart lostpointercapture mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing pointercancel pointerdown pointerenter pointerleave pointermove pointerout pointerover pointerup progress ratechange reset resize scroll securitypolicyviolation seeked seeking select selectionchange selectstart stalled submit suspend timeupdate toggle touchcancel touchend touchmove touchstart transitioncancel transitionend transitionrun transitionstart volumechange waiting wheelcontextlost contextrestoredversionchangedevicechangekeystatuseschange messagechangesourceclose sourceended sourceopenclick close error showcontextlost contextrestoredchangeerror statechangechangecontrollerchange messageerrorcanmakepayment fetch messageerror notificationclose paymentrequest syncupdatefoundabort error update updateend updatestartaddsourcebuffer removesourcebufferenter exitremovetrackafterprint beforeprint beforeunload hashchange languagechange message messageerror offline online pagehide pageshow popstate rejectionhandled storage unhandledrejection unloadoffline online rejectionhandled unhandledrejectionabort error load loadend loadstart progress timeoutIDBObjectStoreOrIDBIndexUnion and IDBObjectStoreOrIDBIndexOrIDBCursorUnion from the akasha.indexdb package to the akasha.idb package. This was done to align with the rename of indexDB package that occurred prior to the initial release of akasha.@org.jetbrains.annotations.ApiStatus.Internal annotation 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.code parameter to GPUShaderModuleDescriptor.create() is annotated with @WGSL.goog.global with $wnd in 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 where goog.global had not been assigned and thus the Akasha code would generate errors when using the symbol. This change eliminated this possibility.@JsOverlay methods of the form boolean 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 either true or false when 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 property akasha.is__Navigator_bluetooth__supportedNavigator.isGpuSupported() with a property akasha.is__Navigator_gpu__supportedWindow.isLocalStorageSupported() and WindowGlobal.isLocalStorageSupported() with a property akasha.is__Window_localStorage__supportedWindow.isIndexedDBSupported() and WindowGlobal.isIndexedDBSupported() with a property akasha.is__Window_indexedDB__supportedWindow.isSessionStorageSupported() and WindowGlobal.isSessionStorageSupported() with a property akasha.is__Window_sessionStorage__supportedWindow.isSpeechSynthesisSupported() and WindowGlobal.isSpeechSynthesisSupported() with a property akasha.is__Window_speechSynthesis__supportedNavigator.isClipboardSupported() with a property akasha.is__Navigator_clipboard__supportedNavigator.isCredentialsSupported() with a property akasha.is__Navigator_credentials__supportedNavigator.isGeolocationSupported() with a property akasha.is__Navigator_geolocation__supportedNavigator.isGetGamepadsSupported() with a property akasha.is__Navigator_isGetGamepadsSupported__supportedNavigator.isMediaDevicesSupported() with a property akasha.is__Navigator_mediaDevices__supportedNavigator.isPermissionsSupported() with a property akasha.is__Navigator_permissions__supportedNavigator.isRequestMediaKeySystemAccessSupported() with a property akasha.is__Navigator_requestMediaKeySystemAccess__supportedNavigator.isSendBeaconSupported() with a property akasha.is__Navigator_sendBeacon__supportedNavigator.isServiceWorkerSupported() with a property akasha.is__Navigator_serviceWorker__supportedNavigator.isShareSupported() with a property akasha.is__Navigator_share__supportedNavigator.isVibrateSupported() with a property akasha.is__Navigator_vibrate__supportedNavigator.isWakeLockSupported() with a property akasha.is__Navigator_wakeLock__supportedNavigator.isXrSupported() with a property akasha.is__Navigator_xr__supportedakasha.StringOrLongLongUnion type to akasha.core.StringOrLongLongUnion as it is only used by the akasha.core.JSON type.akasha:webgpu-j2cl artifact which is an Elemental2 compatible variant of the WebGPU specification.TrustedScript symbol from the externs generated for the akasha:j2cl artifact 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
really interesting work, but don't you think something like feature detection should be handled by a dedicated library like Modernizr for example? You likely want to check for vendor prefixed support when you do feature detection.