Script And ECMAScript / Relationship Between Them?
Oct 7, 2009Can any explain the relationship between JavaScript and ECMAScript?
View 4 RepliesCan any explain the relationship between JavaScript and ECMAScript?
View 4 Repliesin UML? I just found that UML is actually very class-based. It's
difficult to depict the relationship between a constructor function,
its prototype property, and objects that are created using that
constructor function using UML.
Have any of you ever attempted this? How would you do it?
it seems that the only way to get access to mouse position is via predefined events: mouseover, etc, where the mouse-position/object-beneath-mouse is stored in some properties of the event object such as clientX/target;
these properties are only accessible to me, the web developer, via the event object generated for the event;
so the problem is: what happens if none of the pre-defined events suit me?
specifically - all of the pre-defined events depend on user interaction: onmousemove, onfocus, onscroll, etc;
so if I do not have a user-interaction at some moment but yet still need mouse-position/object-beneath-mouse information I am out of luck ...
UNLESS I know how the event objects gather that info themselves;
for instance, onmouseover -- how does some <div> know that the mouse just moved over it?
I presume that on some internal clock scale, a time_A_mouse_pos is compared to a time_B_mouse_pos; and furthermore all objects in the document are queried at each time_N until some object says "hey, browser, I am located at that position";
so I would like to know how to access this internal communication between the mouse and the document that apparently the 'event' object accesses whenever an event is generated;
Does the "semicolon insertion" really affect you if you format code as
function x (y)
{
// ...
}
instead of:
function x (y) {
// ...
}
The jslint page complains about lines ending in ) due to the nebulous
idea of "semicolon insertion". I have not reviewed the ECMAScript pdf
in great detail to try to pin this pretty-printing issue down. In
general, I find that code formatted in the "K&R" style (opening brace
on same line as if, while, function) confusing and difficult to read
compared with placing curly braces on separate lines.
On another subject, the difference between inner functions defined
explicitly versus defined using function expressions seems like a good
one for a FAQ. Under what circumstances does it make a real
difference whether you use function expression versus function
statement versus Function object?
The ECMAScript Technical Committee is now working on the fourth
edition, the first implementation of which is JScript.NET. It
includes a compiler, allowing you to create standalone JScript
executables.
The fourth edition of ECMAScript will provide new features like
typed variables, and classes. More information can be found at:
I noticed the recent move to standards compliant JavaScripting. All my code (XHTML and CSS) is coded to standards, so I don't want to start learning outdated material that wont sit right on with web standards.
What is the difference between JavaScript, ECMAScript and the DOM ?
I found a cheap JavaScript book at a bookstore (in the bargain bin) that looked quite good despite the low price. Will I most likely be learning invalid techniques if I use this book as a starting point?
I feel lost with all these different terms that seemingly mean the same thing: JavaScript.
I want to learn it, but I don't want to waste my time either. What is the best way to learn standards compliant JavaScript? Can I continue with what I have already (I have the JavaScript bible and another book I forget the title at this time) then slightly alter my knowledge to be standards compliant, or is it a whole new ball game?
Sorry I couldn't find appropriate group for
SVG and ECMAScript. Since SVG is in XML format
and ECMAScript is very similar to JavaScript.
What's why I post in these two groups.
In the O'Reilly SVG book, in chapter 11
Animating and Scripting SVG. It mentions
some very basic functions like
var circle = event.getTarget();
var obj = svgDocument.getElementById("idName");
I got error message said these are no a function
in Firefox and batik-squiggle.jar
When I used SVGView plug-in (made by Adobe) for IE .
I typed:
var svgObject = evt.target;
var svgDoc = svgObject.getOwnerDocument();
var svgElement = svgDoc.getElementById(idName);
var svgStyle = svgElement.getStyle();
svgStyle.setProperty('stroke-width', 3);
These lines are working fine for SVGViwe Plug-in by
not work for Firefox and batik.
They complained that getOwnerDocument is not a function.
I tried to change getSVGDocument but no luck.
Is that O'Reilly book too old? Its first editoin is 2002.
How can I make getElementById() working in Firefox and Batik?
Is there some examles or some documents?
I'm testing out the Opera browser to see what to expect from the upcomming Wii browser. But whenever I try to play this javascript game (www.kirl.nl/javaSnake.html), I get the following error:
"ECMAScript interpreter stack overflow.
Script terminated."
How does Opera handle Javascript diffrently, is there possibly a site wich lists the diffrences between the browsers and how they handle code?
Any specific Opera quirks you know of?
I am a begginer in JavaScript,
Do I start learning(today) ECMAScript 5 or ES3 and then learn ES5?
In JavaScript 1.5, objects can use special getter and setter functions
[1] for properties. However, these only seem to be implemented in Gecko
and, AFAICT, don't seem to be part of ECMAScript.
Is there an alternative syntax I can use that is standardised in
ECMAScript and also (preferably) interoperably implemented in several
browsers? Or, do I have to use ordinary getFoo() and setFoo() functions. Code: