Skip to content

Instantly share code, notes, and snippets.

@bsoule bsoule/index.html
Last active Mar 22, 2019

What would you like to do?
object error event
<!DOCTYPE html>
<title>test object svg reload</title>
let beeurl = ""
let noturl = ""
let svgurl = ""
function updateSVG(url) {
let svgObject = document.getElementById("graph")
svgObject.onload = () => {
console.log("loaded object")
svgObject.onerror = () => {
console.log("error object")
svgObject.parentNode.replaceChild(svgObject, svgObject)
body { text-align: center; }
<div class="panel">
<div class="main">
<object type="image/svg+xml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.