Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript load on error

let script = document.createElement('script');
script.src = "https://example.com/404.js"; // no such script
document.head.append(script);

script.onerror = function() {
  alert("Error loading " + this.src); // Error loading https://example.com/404.js
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: como contar los checkbox jquery 
Javascript :: react random string 
Javascript :: reverse 
Javascript :: make navigation open when items are active 
Javascript :: FirebaseError: Unknown field filter op. 
Javascript :: upload file to s3 using pre signed url javascript 
Javascript :: concat vs spread 
Javascript :: load image file input jquery 
Javascript :: HSET redis, HINCRBYFLOAT redis 
Javascript :: nextjs on route change content not changing 
Javascript :: javascript object duplicate keys 
Javascript :: prisma.db firebase 
Javascript :: jquery find include self 
Javascript :: express docs 
Javascript :: reverse an array in javascript 
Javascript :: convert .js file to ts 
Javascript :: stack overflow multiselect error react 
Javascript :: onClick: share image on Facebook angular 9 
Javascript :: load content on user language in javascript 
Javascript :: object wrappers in javascript 
Javascript :: scriptcase transforming local to global variable 
Javascript :: convert csv to json typescript 
Javascript :: get object property dynamically liquid 
Javascript :: javascript How to show array content in output window 
Javascript :: angular create spec file for existing component 
Javascript :: AngularJS - get previous selected option after ng-click on a ng-repeat 
Javascript :: I am getting an error "createSpyObj requires a non-empty array" with running unit tests, which were executed perfectly before 
Javascript :: socket io check send 
Javascript :: PAN SNAP 
Javascript :: debouce with clear debounce function javascript 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =