WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
Bug 91463
add support for beforescriptexecute/afterscriptexecute event
https://bugs.webkit.org/show_bug.cgi?id=91463
Summary
add support for beforescriptexecute/afterscriptexecute event
Syoichi Tsuyuhara
Reported
2012-07-16 19:08:40 PDT
> 2. Fire a simple event named beforescriptexecute that bubbles and is cancelable at the script element. > If the event is canceled, then abort these steps. > (snip) > 6. Fire a simple event named afterscriptexecute that bubbles (but is not cancelable) at the script element.
http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2012-07-18 12:32:59 PDT
Do other browsers support this?
Syoichi Tsuyuhara
Comment 2
2012-07-18 18:11:34 PDT
(In reply to
comment #1
)
> Do other browsers support this?
Yes, it's Firefox 4+(Gecko 2+).
https://bugzilla.mozilla.org/show_bug.cgi?id=587931
https://developer.mozilla.org/en/DOM/element.onbeforescriptexecute
https://developer.mozilla.org/en/DOM/element.onafterscriptexecute
By the way, Opera's User JavaScript has BeforeScript/AfterScript event.
http://www.opera.com/docs/userjs/specs/#BeforeScript
http://www.opera.com/docs/userjs/specs/#AfterScript
But, I'm not sure whether current Firefox's implementation follow HTML spec. related:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-February/034629.html
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-May/035713.html
zanetu
Comment 3
2012-12-28 15:38:47 PST
I can confirm this bug with Chrome v23.0.1271.97 on 64-bit Debian Unstable. Both Iceweasel v10.0.11 and Opera v12.12 support "beforescriptexecute" whereas Chrome v23.0.1271.97 does not.
Joel Martin
Comment 4
2013-03-09 14:28:23 PST
Just ran into this bug in Chrome 25.0.1364.97 [537.22 (@143379)]. Please add support to match firefox support and comply with the spec.
tomme87
Comment 5
2013-12-21 13:36:51 PST
Ran into this bug myself. Not having this functionality is very frustrating, specially when making userscripts.
zanetu
Comment 6
2014-03-27 17:24:46 PDT
Now that beforeload, which used to be the only workaround, is no longer supported (
https://code.google.com/p/chromium/issues/detail?id=333318
), this bug appears more urgent than ever. :(
Ryosuke Niwa
Comment 7
2015-09-04 17:10:51 PDT
This is now covered by LayoutTests/http/tests/w3c/html/semantics/scripting-1/the-script-element/script-before-after-events.html
Radar WebKit Bug Importer
Comment 8
2015-09-04 17:12:03 PDT
<
rdar://problem/22588270
>
Michael Wyraz
Comment 9
2015-09-09 01:29:23 PDT
Advertisers have started to bypass adblockers by using special inline scripts. Recent approaches for analyzing and blocking these scripts (e.g.
https://openuserjs.org/scripts/schwarztee/AdDefend_Klatsche/source
) won't work in webkit unless these events are implemented!
kitit
Comment 10
2015-10-19 07:57:54 PDT
Come on guys, Firefox already implemented this, you didn't. Therefore WebKit browsers fail certain HTML5 tests, like this one:
http://www.w3c-test.org/html/semantics/scripting-1/the-script-element/script-before-after-events.html
Firefox passes all these tests. I thought WebKit is all about supporting standards like HTML5?
herbert00
Comment 11
2015-10-19 08:26:45 PDT
This is very important functionality. The developers of AdBlock Plus (one of the most installed addons) need this to implement a new feature:
https://issues.adblockplus.org/ticket/3207
But they can't because Chromium developers refuse to implement a feature that is officially part of the W3C HTML5 standard.
Cris Stringfellow
Comment 12
2016-01-26 10:15:28 PST
A polyfill :
https://github.com/dosaygo/open-0/tree/master/script-events
Aryeh Gregor
Comment 13
2017-08-10 08:10:57 PDT
This is no longer in the spec, so if you actually want to implement it, you should probably get it re-added to the spec first.
Lucas Forschler
Comment 14
2019-02-06 09:19:12 PST
Mass move bugs into the DOM component.
Ryosuke Niwa
Comment 15
2019-02-06 21:56:13 PST
We're not going to implement this non-standard event, which has been removed from the spec.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug