Fix 'prevent-element-src-loading' — 'onerror', 'onload', 'link' #276
Labels
bug
Something isn't working
Priority: P3
Release: v1.9.37
Resolution: Fixed
Status: Closed
Version: Scriptlets v1.9
Original issue: #264
onerror
(if I'm not wrong, it doesn't work correctly)onload
functionlink
First, if I understand correctly, currently if there is
onerror
event thennoopFunc
is returned:Scriptlets/src/scriptlets/prevent-element-src-loading.js
Line 177 in 202f6d8
What in case if there will be
onload
event?Something like:
Test website - https://jsfiddle.net/sL62htaz/
Will be
onload
executed or not?If not, maybe it will be a good idea to check if
onload
is a function and then return it.Second - at the moment we can prevent
script
,img
andiframe
, but lately I noticed that one of the websites is usinglink
.Something like:
Test page - https://jsfiddle.net/e2un8pav/
Maybe we could also add
link
to possible values.The text was updated successfully, but these errors were encountered: