This thread gave me the idea to compare performances of 2 ways of
creating objects :
- by adding methods to prototype object
- by adding methods directly to the new object (but function
definitions are not copied and parsed for each new object)
The majority of modern browsers give better results w
Hey Scott,
I feel that flow-control is the future of JavaScript, and love that
you're embracing deferreds. I think folks are beginning to realize
that you can't trust functions - so constructs must evolve in order to
control their execution. Anyway, your flow function looks concise and
elegant.
I
2011/4/28 Allex :
> Thanks a lot :)
>
> clearfy a lot now, still noticed in some codes, such as base2.js, when
> there is a node reference variable. we can do it like this:
>
> function getNode() {
> var node = ..; // get a HTMLElement reference.
>
> // do some thing, e.g, bind event etc,.
>
> /
thanks a lot.
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/jsmentors@jsmentors.com/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/jsmentors@googlegroups.com/
To unsubscribe from this group, send email to
js
Thanks a lot :)
clearfy a lot now, still noticed in some codes, such as base2.js, when
there is a node reference variable. we can do it like this:
function getNode() {
var node = ..; // get a HTMLElement reference.
// do some thing, e.g, bind event etc,.
// then we can destroy it as (but
Hey all
I've wrote a free JS sandbox that you may be interested in. I'm looking for
any help you're willing to provide, break the sandbox, find syntax errors or
rewriting mistakes. The project is released under the freebsd license so you
can use it in commercial applications.
Demo available here:
On Wed, Apr 27, 2011 at 11:03 PM, Allex wrote:
> Hello, i want to consult some issues of javascript language, whether
> we need manually set some local variable (create by var xxx) to null?
>
As usual, "it depends". But for most cases you don't. At the end of a
function, all variables are destr
Hello, i want to consult some issues of javascript language, whether
we need manually set some local variable (create by var xxx) to null?
e.g,
function() {
var obj = {};
// do somethings which has used variable 'obj'
.
// obj = null; // is this statements required? thanks
return true;
Bemi Faison wrote:
> Actually, there _is_ another github project called flow-js
>(https://github.com/willconant/flow-js), which shares the goal of
> ordered execution.
I hadn't seen that one. It's a very similar concept to my own,
although mine uses a declarative syntax. I have only just done a