![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Simple class that detects SVG support and appends SVG or png fallback to the document
Simple function that detects SVG support and appends the SVG or the png fallback to the document
The library loads and injects SVG files inline with support for fallback to a png file in case the browser doesn't support SVG.
Add the script to your page the classic way, inside a script tag or load it using a module loader (it's UMD packed). If you're using npm just npm install it:
npm install svgload
Execute the function passing an object with the following parameters: target - The element on the page that'll get the image injected url - The url to the asset, without the file extension like: '/asets/image' callback - A callback function that'll be executed after each element is injected
<h1></h1>
<div class="img"></div>
<script>
svgLoad([{
target: '.img',
url: 'test/assets/test',
callback: function() {
var hOne = document.querySelector('h1');
hOne.innerHTML = 'It worked!';
}
}])
</script>
It should work on:
Any browser that supports querySelector
and XHR
should work too.
FAQs
Simple class that detects SVG support and appends SVG or png fallback to the document
We found that svgload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.