Re: [whatwg] script features

2012-03-25 Thread Jonas Sicking
On Fri, Mar 23, 2012 at 9:41 PM, Ian Hickson i...@hixie.ch wrote: On Fri, 23 Mar 2012, Jonas Sicking wrote: The whole point of this feature is to enable the js-code inside a loaded script to use the .currentScript property in order to find the script element in the DOM which loaded it. Ah,

Re: [whatwg] script features

2012-03-24 Thread Kornel Lesiński
On Sat, 24 Mar 2012 04:41:38 -, Ian Hickson i...@hixie.ch wrote: The whole point of this feature is to enable the js-code inside a loaded script to use the .currentScript property in order to find the script element in the DOM which loaded it. Ah, ok. What's the use case for that?

Re: [whatwg] script features

2012-03-23 Thread Jonas Sicking
On Fri, Feb 3, 2012 at 10:34 PM, Ian Hickson i...@hixie.ch wrote: On Mon, 16 Aug 2010, Jonas Sicking wrote: I'd like to propose a couple of simple features to make script elements more useful: 1. document.currentScript This property returns the currently executing script, if any. Returns

Re: [whatwg] script features

2012-03-23 Thread Ian Hickson
On Fri, 23 Mar 2012, Jonas Sicking wrote: The whole point of this feature is to enable the js-code inside a loaded script to use the .currentScript property in order to find the script element in the DOM which loaded it. Ah, ok. What's the use case for that? -- Ian Hickson

Re: [whatwg] script features

2010-08-24 Thread Henri Sivonen
On Aug 17, 2010, at 07:15, Jonas Sicking wrote: These events fire right before and right after a script is executed. This allows a page to override the context a specific script is seeing. The relative order with onload should be documented. (I've written an implementation for firefox for

Re: [whatwg] script features

2010-08-18 Thread Jonas Sicking
On Tue, Aug 17, 2010 at 9:45 PM, John J. Barton johnjbar...@johnjbarton.com wrote: (though I'm not sure which environment is compiled in other than the global object, which you can't replace anyway, at least not for now). Well if I intercept the event and change the source to  

Re: [whatwg] script features

2010-08-18 Thread John J. Barton
On 8/17/2010 11:52 PM, Jonas Sicking wrote: On Tue, Aug 17, 2010 at 9:45 PM, John J. Barton johnjbar...@johnjbarton.com wrote: (though I'm not sure which environment is compiled in other than the global object, which you can't replace anyway, at least not for now). Well if I intercept the

Re: [whatwg] script features

2010-08-18 Thread Jonas Sicking
On Tue, Aug 17, 2010 at 10:39 PM, John J. Barton johnjbar...@johnjbarton.com wrote:  On 8/17/2010 11:52 PM, Jonas Sicking wrote: On Tue, Aug 17, 2010 at 9:45 PM, John J. Barton johnjbar...@johnjbarton.com  wrote: (though I'm not sure which environment is compiled in other than the global

Re: [whatwg] script features

2010-08-17 Thread Giorgio Maone
They would be great additions, thanks. 2. scriptwillexecute/scriptdidexecute events Notice that Opera has a richer set of eventsof this kind (exsposed to privileged User Scripts, though, AFAIK), allowing for much more control over the executing scripts, no matter if from script elements,

Re: [whatwg] script features

2010-08-17 Thread Nicholas Zakas
! Morpheus: My beliefs do not require them to. -Original Message- From: whatwg-boun...@lists.whatwg.org [mailto:whatwg-boun...@lists.whatwg.org] On Behalf Of Giorgio Maone Sent: Monday, August 16, 2010 11:12 PM To: Jonas Sicking Cc: WHAT Working Group Subject: Re: [whatwg] script features

Re: [whatwg] script features

2010-08-17 Thread John J Barton
whatwg-requ...@lists.whatwg.org wrote: Date: Mon, 16 Aug 2010 21:15:35 -0700 From: Jonas Sicking jo...@sicking.cc To: WHAT Working Group wha...@whatwg.org Subject: [whatwg] script features Message-ID: aanlktin3t5zb4druxj8ws_hiusgs3pmozl8wogrtc...@mail.gmail.com Content-Type: text/plain

Re: [whatwg] script features

2010-08-17 Thread Jonas Sicking
On Tue, Aug 17, 2010 at 2:17 PM, John J Barton johnjbar...@johnjbarton.com wrote: whatwg-requ...@lists.whatwg.org wrote: Date: Mon, 16 Aug 2010 21:15:35 -0700 From: Jonas Sicking jo...@sicking.cc To: WHAT Working Group wha...@whatwg.org Subject: [whatwg] script features Message-ID

Re: [whatwg] script features

2010-08-17 Thread John J Barton
: [whatwg] script features Message-ID: aanlktin3t5zb4druxj8ws_hiusgs3pmozl8wogrtc...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi All, I'd like to propose a couple of simple features to make script elements more useful: 1. document.currentScript This property returns

Re: [whatwg] script features

2010-08-17 Thread Jonas Sicking
...@sicking.cc To: WHAT Working Group wha...@whatwg.org Subject: [whatwg] script features Message-ID:        aanlktin3t5zb4druxj8ws_hiusgs3pmozl8wogrtc...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi All, I'd like to propose a couple of simple features to make script

Re: [whatwg] script features

2010-08-17 Thread John J. Barton
On 8/17/2010 6:43 PM, Jonas Sicking wrote: ... [1] http://www.whatwg.org/specs/web-apps/current-work/#executing-a-script-block Ok so I see where executing a script block becomes executing script. (though I'm not sure which environment is compiled in other than the global object, which you

[whatwg] script features

2010-08-16 Thread Jonas Sicking
Hi All, I'd like to propose a couple of simple features to make script elements more useful: 1. document.currentScript This property returns the currently executing script, if any. Returns null if no script is currently executing. In the case of several nested executing scripts, it returns the