
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
org.realityforge.com.google.elemental2:elemental2-webgl
Advanced tools
Thin Java abstractions for the native Web Graphics Library APIs.
Elemental2 provides type checked access to all browser APIs for Java code. This is done by using closure extern files and generating JsTypes, which are part of the new JsInterop specification that is both implemented in GWT and J2CL.
Using Bazel 8 or later, add to your `MODULE.bazel` file:
bazel_dep(name = "elemental2", version = "<RELEASE_VERSION>")
Replace RELEASE_VERSION with an actual
release version:
Now from you can add elemental2 targets as needed to your j2cl_library deps.
Following are the different elemental2 modules and their target names:
| module | Bazel targets for J2CL |
|---|---|
| core | @elemental2//:elemental2-core-j2cl |
| dom | @elemental2//:elemental2-dom-j2cl |
| promise | @elemental2//:elemental2-promise-j2cl |
| indexeddb | @elemental2//:elemental2-indexeddb-j2cl |
| svg | @elemental2//:elemental2-svg-j2cl |
| webgl | @elemental2//:elemental2-webgl-j2cl |
| media | @elemental2//:elemental2-media-j2cl |
| webstorage | @elemental2//:elemental2-webstorage-j2cl |
If your project uses Maven, add the following maven
dependencies in your pom.xml. Replace RELEASE_VERSION with an actual
release version:
<dependency>
<groupId>com.google.elemental2</groupId>
<artifactId>${artifact-id}</artifactId>
<version>RELEASE_VERSION</version>
</dependency>
| module | artifact-id |
|---|---|
| core | elemental2-core |
| dom | elemental2-dom |
| promise | elemental2-promise |
| indexeddb | elemental2-indexeddb |
| svg | elemental2-svg |
| webgl | elemental2-webgl |
| media | elemental2-media |
| webstorage | elemental2-webstorage |
Elemental2 v1.0.0+ requires GWT 2.9 or above.
If you use Elemental2 with GWT, you need to inherit the right gwt module in your gwt.xml file:
| module | GWT module name |
|---|---|
| core | elemental2.core.Core |
| dom | elemental2.dom.Dom |
| promise | elemental2.promise.Promise |
| indexeddb | elemental2.indexeddb.IndexedDb |
| svg | elemental2.svg.Svg |
| webgl | elemental2.webgl.WebGl |
| media | elemental2.media.Media |
| webstorage | elemental2.webstorage.WebStorage |
If you want to modify and/or build the last version on your own, follow the instructions below:
$ npm install -g @bazel/bazelisk
$ alias bazel=bazelisk
$ git clone https://github.com/google/elemental2.git
$ cd elemental2
$ ./maven/release_elemental.sh --version local --no-deploy
The script will output the directory containing the generated jar files that can be used with maven.
Please refer to the contributing document.
Please refer to the license file.
This is not an official Google product.
FAQs
Thin Java abstractions for the native Web Graphics Library APIs.
We found that org.realityforge.com.google.elemental2:elemental2-webgl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.