From: Raymond I. <xw...@ya...> - 2003-10-08 14:33:06
|
See below: --- Leif W <war...@us...> wrote: > > I also think it looks a bit confusing at first, at > least not intuitive. I > believe it's just illustrating two things. First, > you have a "hook" in the > FileReader constructor so you can pass a function as > an argument. Second, I > think it shows that you can get the contents of the > url using the read > function. But it's hard for me to absorb, even > though there's barely 1kb of > code alltogether. > Well I guess your correct not much thought was put into it's design. Maybe something like: var fl = new FileReader(); fl.OnInit(function(){ // this function is called // once the filereader object has been // initialized var url = 'mypage.html'; var rt = this.read(url); }) How about the above? Is it more intuitive? -- Raymond Irving __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |