Skip to content

Commit c445092

Browse files
author
ZxBud
committed
Improved image creation
`new Image()` creation can trigger a bug into an older version of Chrome. I suggest the 'more compliant' way to create a node into the dom. http://stackoverflow.com/questions/15469763/an-attempt-was-made-to-reference-a-node-in-a-context-where-it-does-not-exist
1 parent 471eb36 commit c445092

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/raven.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ function send(data) {
717717

718718

719719
function makeRequest(data) {
720-
var img = new Image(),
720+
var img = document.createElement('img'),
721721
src = globalServer + authQueryString + '&sentry_data=' + encodeURIComponent(JSON.stringify(data));
722722

723723
img.crossOrigin = 'anonymous';

0 commit comments

Comments
 (0)