Slashdot Mirror


Mozilla Extending Javascript?

Nomad128 writes "Mozilla's Deer Park 1 Alpha RC appears to have extended the Javascript spec for the first time in quite some time. New features include Array object methods "every" (logical AND), "some" (logical OR), "map" (function mapping), and "forEach" (iteration). They also appear to have added native XML support. Will this speed up the development of AJAX applications and give Moz a leg-up over IE7?"

207 of 286 comments (clear)

  1. Javascript Extensions by TheSpoom · · Score: 5, Insightful

    I don't think the Javascript extensions will be used very much. Personally, I'm coding Javascript that will work in most browsers, which means I have to specifically exclude this new Javascript unless IE et al also implement it (and even then, older browsers still won't like it). Not to be anti-Mozilla, but this does sound a bit like embrace and extend to me. (Yes, I know it's open source and others can read the specs.)

    On the other hand, it looks like the things that they did add were mostly based on standards and the DOM spec, so we'll see where this goes.

    --
    It's better to vote for what you want and not get it than to vote for what you don't want and get it.
    - E. Debs
    1. Re:Javascript Extensions by 1010011010 · · Score: 4, Informative

      If they are useful for people developing on the "mozilla platform", then they are useful features. For example, Firefox and Thunderbird, and extensions to each, can use these new features. They can't be used in web pages unless you want them to be Mozilla-only, of course.

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    2. Re:Javascript Extensions by eyeye · · Score: 5, Insightful

      As a XUL developer I welcome these additions that will make the language more pleasant to code in.

      They shouldnt be used where they impact on cross browser compatibility though.

      --
      Bush and Blair ate my sig!
    3. Re:Javascript Extensions by vidarlo · · Score: 2, Interesting
      I don't think the Javascript extensions will be used very much. Personally, I'm coding Javascript that will work in most browsers, which means I have to specifically exclude this new Javascript unless IE et al also implement it (and even then, older browsers still won't like it). Not to be anti-Mozilla, but this does sound a bit like embrace and extend to me. (Yes, I know it's open source and others can read the specs.)

      This mainly depends whatever any other browser picks it up. Compare this with last story, about a new browser war. Clearly the firefox developers have to keep a very sharp focus at extending and develeoping mozilla/firefox to keep up against IE7. Only thing I hope is that it won't lead to the spagethi-code-era once again...

      One thing I'm wondering is if there is a single standard for javascript. Wikipedia has a entry about javascript, mentioning ECMA-script. How does those addons fit into the standards?

    4. Re:Javascript Extensions by KiloByte · · Score: 2, Insightful

      Right, nearly all time spent coding in Javascript is spent making sure it works correctly in different browsers.
      Unfortunately, it will be a cold day in hell when IE has decent support for the standards -- and add an aeon or two until older versions of IE are phased out.

      This said, I'm not a web developer myself -- but when I updated our company's website recently, I would have spent around 10% of the time I needed. Coding around all quirks in different browsers is NOT FUN.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    5. Re:Javascript Extensions by blowdart · · Score: 1
      it will be a cold day in hell when IE has decent support for the standard

      And of course when someone goes their own way and breaks the standard by embrace and extend then supporting the standard doesn't help. If MS did this slashdot would be up in arms, when it's Open Source suddenly it's ok?

    6. Re:Javascript Extensions by KiloByte · · Score: 3, Insightful

      You're right. Embrace and extend is wrong anywhere.

      It's exactly why the metric system is so much better than the imperial one: instead of land miles, sea miles, survey miles, international miles, furlongs, leagues, feet, etc, you have just a single unit. Even Americans can't stick to a single mile (they have like 3 or 4) -- and this is what makes miles something really repulsive to me. Similarily with web standards: if you need to write everything separately for every possible browser and its version, everything becomes a hell -- no matter if the browsers come from the Bad or the Good side.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    7. Re:Javascript Extensions by neil.pearce · · Score: 4, Informative

      Well, I only had a quick look, but these extensions don't appear to be very difficult to reproduce in other browsers...

      The following mimics the forEach extension - and works in Mozilla, Opera and IE

      Array.prototype.forEach = function(fn) {
      for(var i =0; i this.length; ++i) {
      fn(this[i], i, this);
      }
      }

      function foo(obj, index, array) {
      alert("index " + index + " is " + obj);
      }

      [4,5,6].forEach(foo);

      (Only had a quick look at the Mozilla article and 5 mins knocking the source up, so excuse any silly errors)

    8. Re:Javascript Extensions by DrSkwid · · Score: 2, Interesting

      if you did spend all day working in ajavscript, then you'd know that you can create a standard library that will work cross browser

      one can replace any functions that are missing or don't work how you like them.

      I remember back in the days before getElementById in I.E. I added my own so that I could write my code assuming it was present :

      document.getElementById = function (id) { ..... }

      as you go along you find out what works what doesn't.

      It's not *that* different from developing wxWindows or gtk to work on windows & X : find the glitches, work round 'em

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    9. Re:Javascript Extensions by neil.pearce · · Score: 4, Informative

      Ditto for "map". Actually I didn't notice they also specified an optional "this object" for forEach()...

      Array.prototype.map = function(fn, array) {
      var thisObject = array == undefined ? this : array;
      var result = [];
      for(var i =0; i thisObject.length; ++i) {
      result.push(fn(thisObject[i]));
      }
      return result;
      }

      function makeUpperCase(obj) {
      return obj.toUpperCase();
      }

      strings = [ "hello", "Array", "WORLD" ];
      uppers = strings.map(makeUpperCase);

      alert(uppers);
      alert(strings);

    10. Re:Javascript Extensions by JohnFluxx · · Score: 1, Redundant

      Um, useful for XUL just like the parent said.

    11. Re:Javascript Extensions by neil.pearce · · Score: 1

      Strings don't inherit from Arrays.
      Strings call chain is "String prototype object" --> "Object prototype object"

      But anything with a call chain ending in the Array prototype object would be affected.

    12. Re:Javascript Extensions by neil.pearce · · Score: 4, Informative

      ECMA spec allows you to add in anything you want...

      A conforming implementation of ECMAScript is permitted to provide additional types, values, objects,
      properties, and functions beyond those described in this specification. In particular, a conforming
      implementation of ECMAScript is permitted to provide properties not described in this specification, and
      values for those properties, for objects that are described in this specification.

    13. Re:Javascript Extensions by neil.pearce · · Score: 1

      Slashdot filter stole the less than comparison within the for loops...

    14. Re:Javascript Extensions by DrSkwid · · Score: 1

      hmm, it might have been the other way round and I had to add it for mozilla
      I don't do javascript much any more, much as I like the language

      whichever, my point still stands

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    15. Re:Javascript Extensions by Anonymous Coward · · Score: 1, Informative

      Many of MSIE's extentions were put in there for "internal use" in standalone HTA applications and parts of the Windows UI.

    16. Re:Javascript Extensions by Inigo+Montoya · · Score: 1

      How is the parent "Insightful" ?!? More like "Redundant". A "me too" post is not insightful!

      Folks, use your mod points well.

    17. Re:Javascript Extensions by wft_rtfa · · Score: 1

      Hopefully, some of these changes will be included in the next version of the ECMA specification. Then other browsers will provide support, so eventually these changes could mean something to more than just XUL developers.

      --
      :-] :0 :-> :-| :->
    18. Re:Javascript Extensions by jrockway · · Score: 1

      > They can't be used in web pages unless you want them to be Mozilla-only, of course.

      Of course, who wouldn't want their web page to be Mozilla-only? I think I am going to rewrite my webpage with these extenstions in mind. Fuck off and die, IE.

      --
      My other car is first.
    19. Re:Javascript Extensions by neil.pearce · · Score: 1

      To be fair, your problems are nothing to do with Javascript. It is the differences in the DOM provided by each browser that is giving you strife.

      Mozilla, Opera and Internet Explorer all implement Javascript remarkably well.

      (As a C/C++ developer) would you call differences/bugs in some "commonly expected to be present" 3rd party library a problem with the C/C++ language?

    20. Re:Javascript Extensions by mjh · · Score: 4, Funny
      As a XUL developer I welcome...

      Was it just me or did anyone else finish that sentence with, "our javascript overlords" or some other such permutation?

      I might watch too much of The Simpsons.

      --
      Key to financial independence: Spend less than you earn. Save and invest the difference. Do it for a long time.
    21. Re:Javascript Extensions by jp10558 · · Score: 2, Insightful

      Except, why would you want to exclude Opera or Konqurer or Safari?

      --
      Opera, Proxomitron-Grypen,GPG 0x0A1C6EE3
    22. Re:Javascript Extensions by neil.pearce · · Score: 1

      A fully conforming Javascript implentation provides singleton objects (silently instantiated) such as "String-Prototype object", "Object-Prototype object", "Number-Prototype object", "Function-Prototype object"...

      All Javascript objects contain a property "prototype" that references another object. When you invoke a method on a object, the prototype property chain is searched for a matching definition.

      When a JavaScript String is created, its "prototype" property references the "String-Prototype object".

      The String-Prototype object contains definition for functions such as "indexOf", "toUpperCase"...

      The String-Prototype object's prototype property references the Object-Prototype object, containing definitions such as "valueOf", "hasOwnProperty"

      A Javascript Array has a prototype property referencing the Array-Prototype object (which itself references the Object-Prototype object). (NOTE: a String or the String-Prototype object not involved in the chain)

      Thus a method call on a JavaScript Array cannot reference String-Prototype object methods.

      String : StringPrototypeObject
      StringPrototypeObject: ObjectPrototypeObject

      Array : ArrayPrototypeObject
      ArrayPrototypeObject : ObjectPrototypeObject

      StringPrototypeObject {
      toUpperCase()
      toLowerCase()
      indexOf()
      (Mozilla extension) forEach
      (Mozilla extension) map
      . . .
      }

      ArrayPrototypeObject {
      concat()
      join()
      push()
      pop()
      . . .
      }

      ObjectPrototypeObject {
      toString()
      valueOf()
      . . .
      }

      A C/C++ char* string, however, is just a convention - a sequence of characters, terminated by a (char)0.
      C/C++ arrays and strings bare no resemblance to JavaScript String and Array objects.

    23. Re:Javascript Extensions by chrisbeach · · Score: 1

      "Fuck off and die, IE" Haha, spoken like a true bitter OSS zealot

    24. Re:Javascript Extensions by smittyoneeach · · Score: 1

      I think the point of putting stuff into the spec is to get some performance.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    25. Re:Javascript Extensions by neil.pearce · · Score: 1

      Ooops, the mozilla extensions...

      (Mozilla extension) forEach
      (Mozilla extension) map

      Belong within ArrayPrototypeObject, not StringPrototypeObject.

      Obviously.

    26. Re:Javascript Extensions by ShieldW0lf · · Score: 2, Funny

      "Fuck off and die, IE" Haha, spoken like a true bitter OSS zealot

      Or a web developer... or a network administrator... or an accountant... or a construction worker... or a dentist... or a single mom... or a student... or a man... or a woman... or a child... or...

      --
      -1 Uncomfortable Truth
    27. Re:Javascript Extensions by Frizzle+Fry · · Score: 2, Funny

      I believe that Xul actually welcomes the Gatekeeper and the Keymaster.

      --
      I'd rather be lucky than good.
    28. Re:Javascript Extensions by jesser · · Score: 1

      E4X is a standard published by the same group that publishes the ECMAscript standard. I don't think the array extras are described by any standard.

      --
      The shareholder is always right.
    29. Re:Javascript Extensions by nels_tomlinson · · Score: 1
      Even Americans can't stick to a single mile (they have like 3 or 4)...

      I'm an American, and I'm quite sure that we have exactly one mile, of 5,280 feet, called the statute mile.

      Mariners use for navigation a nautical mile, which is roughly 6076.115 feet. Its length is set by the diameter of the earth. One nautical mile along the equator equals one minute East or West of Greenwich. The nautical mile was dreamed up by the British. Unless you are navigating a boat, you don't need to know any of this.

      You can say that last bit about most of the tangle of traditional weights and measures: if you need them, you'll use them often enough to remember them, and there's no confusion or mystery. If you don't need them, they're quaint curiosities that you needn't know about. The traditional units evolved because they served a definite purpose, and they are the handiest thing for the specific job for which they were intended. A ``one size fits all'' unit doesn't fit most things very well.

      Take a look at my bookmarks on metrification for some interesting articles on this.

      ... and this is what makes miles something really repulsive to me.

      I think it's your imagination that's making things repulsive.

    30. Re:Javascript Extensions by TheSpoom · · Score: 1

      That's what metamodding is for. Don't worry, it'll be caught.

      --
      It's better to vote for what you want and not get it than to vote for what you don't want and get it.
      - E. Debs
    31. Re:Javascript Extensions by John_Booty · · Score: 1

      Even Americans can't stick to a single mile (they have like 3 or 4) -- and this is what makes miles something really repulsive to me.

      What? Could you please elaborate on this? I didn't know there were multiple versions of the mile. Then again, I've only been living in America for 28 years.

      --

      OtakuBooty.com: Smart, funny, sexy nerds.
    32. Re:Javascript Extensions by bahwi · · Score: 1

      Ditto. Now we just need XUL2 and we'll be good to go. =) And Xulrunner.

    33. Re:Javascript Extensions by NeoSkandranon · · Score: 1

      Statute mile, nautical mile first and foremost.

      There are also "Survey miles" and a few other oddballs that the average person will never see

      --
      If you can't see the value in jet powered ants you should turn in your nerd card. - Dunbal (464142)
    34. Re:Javascript Extensions by masklinn · · Score: 1
      • They'll be useful for Extensions (XUL) coders
      • They'll be useful for Greasemonkey scripts coders
      • They may get into the standard (ECMA-262 1.6?)
      • And more important than everything: you can emulate the same function using standard Javascript. This means that if the function is not avaible natively (aka you're not using a Gecko browser) you'll get a full Javascript version, and if it is you'll get the native.
      I don't know how useful they may be, but i'll more than likely check how they behave.
      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    35. Re:Javascript Extensions by digitaleus · · Score: 1

      But the additions mentioned in this article are not "additional types, values, objects, properties, and functions". They're new reserved words, like "for" and "if". Ain't oversimplification a bitch? ;-)

    36. Re:Javascript Extensions by pacc · · Score: 1

      Since XUL itself is XML any way to handling it in a more structured way would make Mozilla easier to code for.

      However, XSLT has been in Mozilla for ages with no possible way to use it for dynamic XUL generation - is this just another way to presenting static XML data?

    37. Re:Javascript Extensions by Kent+Recal · · Score: 1

      There's also robert miles.

      You beat me to it.

    38. Re:Javascript Extensions by pacc · · Score: 1

      To reply to myself,
      from what I have found XUL developers won't have any use for this:
      works with HTML/XHTML loaded via file: or http: URL, it doesn't work with XUL loaded from chrome it seems.

      http://groups.google.com/groups?hl=sv&lr=&selm=d5l e6f%2438r1%40ripley.netscape.com

    39. Re:Javascript Extensions by Ibag · · Score: 3, Insightful

      I might watch too much of The Simpsons.

      Given that the joke was only used on the simpsons once, I think the more reasonable explanation is that you read too much slashdot!

    40. Re:Javascript Extensions by Aaron_bootiemd · · Score: 1

      "You're right. Embrace and extend is wrong anywhere."

      I think anywhere is a bit strong. How do languages evolve then? I think it all depends on the documentation. If you document a feature well, then others can replicate if it's useful. The problem with MS is that they don't have a great reputation when it comes to documenting their "features."

    41. Re:Javascript Extensions by WarpGiGA · · Score: 1

      "So they're how useful, exactly?"

      - They might not seem so useful right now, but who knows, in the future some of this might very well be considered standard. Don't confuse innovation and experimentation with standards and compliance development.

    42. Re:Javascript Extensions by luwain · · Score: 1

      It seems that this is a non-standard extension --i.e., it's not an offically sanctioned extension of the ECMA Script specification. So what we're talking about is a renegade Javascript that will not be supported by all browsers. This is a Microsoft game that I don't think is good to play if you're an advocate of cross-platform, non-proprietary standards (which I am). On the other hand, if they're implementing features that are already in the ECMA specification, then this is constructive progress if other browsers that believe in non-proprietary standards (not IE!!) eventually follow suit. What would be bad is if everyone decided to make their own special extensions to Javascript that aren't in the ECMA spec.

    43. Re:Javascript Extensions by mlevils · · Score: 1

      Perhaps the target isn't "embrace and extend" but the result is the same. As a developer it sounds ok but the FINAL USER will loose in compatibility. If this occours in other open software projects we will be back to the times where each system is a distint world.

    44. Re:Javascript Extensions by mjh · · Score: 1
      I think the more reasonable explanation is that you read too much slashdot!
      That is almost certainly true.
      --
      Key to financial independence: Spend less than you earn. Save and invest the difference. Do it for a long time.
    45. Re:Javascript Extensions by patio11 · · Score: 1

      Hey, we only have two miles (nautical and otherwise), and since I grew up in the most landlocked part of the country I totally disclaim responsibility for the nautical one -- take it up with the Brits, they must have thought it a great way to get more uses of the letter "u", which they seem to have an unhealthy fascination with.

    46. Re:Javascript Extensions by FrangoAssado · · Score: 2, Informative
      But the additions mentioned in this article are not "additional types, values, objects, properties, and functions". They're new reserved words, like "for" and "if".

      On the contrary, the additions mentioned in this article are simply additional methods (a method in javascript is simply a property that contains a function).

      For example, see the documentation for the new forEach() method :

      http://developer-test.mozilla.org/en/docs/Core_Jav aScript_1.5_Reference:Objects:Array:forEach

      The additions are not reserved words.

  2. What? by Umbral+Blot · · Score: 2, Insightful

    Ok I understand there are several benefits to this for extension writers. However, I seriously doubt that it will be used in many other places. After all who wants to write web pages that won't work properly in IE and Safari?

    1. Re:What? by Anonymous Coward · · Score: 2, Interesting

      Right now I'm doing some Web development work within my company where I can control all of the specs. I KNOW what computers, what browsers, &c. will be using the application and if these extensions were to prove useful, I'd just use them. The plan all along was to standardize on Mozilla for this, so that's not really a problem.

      Would I use this for a site that outsiders would ever access? No.

    2. Re:What? by segedunum · · Score: 1

      That didn't seem to bother Microsoft, and we all know what happened. A certain amount of that attitude is necessary if they're going to get their browser share up.

    3. Re:What? by mcc · · Score: 1

      Ok I understand there are several benefits to this for extension writers. However, I seriously doubt that it will be used in many other places.

      Does it need to be used in any other places to have been worthwhile, from the Moz people's perspective?

  3. Moz Extensions by multipartmixed · · Score: 4, Interesting

    This isn't a case of 'embrace and extend', microsoft-style -- this is a case of extra functionality needed to write extensions. Any web developer using these for public apps is clearly a butt-head.

    --

    Do daemons dream of electric sleep()?
    1. Re:Moz Extensions by blowdart · · Score: 1
      it will be a cold day in hell when IE has decent support for the standard

      Just like the Microsoft objects in java were extra functionality to allow you to write java programs to hook into the OS? Once you go outside a standard it's not good, no matter who the source. Unless you want to go back to <blink>?

    2. Re:Moz Extensions by jesser · · Score: 1

      This isn't a case of 'embrace and extend'... Any web developer using these for public apps is clearly a butt-head.

      Couldn't you have used the same argument to defend IE's extensions to DOM?

      --
      The shareholder is always right.
    3. Re:Moz Extensions by multipartmixed · · Score: 1

      > Couldn't you have used the same argument to defend IE's extensions to DOM?

      Damned straight. I'm no Microsoft apologist, but they clearly document which DOM functions are W3C and which are proprietary.

      I have a book which is five years old from MS Press which documents each and every object, collection, property and method -- and the standard they belong to -- in IE4/5.

      I have DHTML which I wrote for IE4 which still runs perfectly on FireFox.

      For that matter, making a LOT of my code work with modern browsers was just a matter of changing the browser detection code from "if ie" to "not if netscape".

      Now, if only the W3C would come out with something as powerful, elgant, and simple as the tabular data control. I'd LOVE to use it for real code. (for an example -- http://ninja250.kingston.net/ex250f-torque.html -- I turned a spreadsheet into a webpage in about 10 minutes. Ignore the Javascript, it's just for unit conversion. The HTML is what's interesting)

      I also would not want microsoft to get rid of the HTA support in IE. It's simply awesome; it's a great way for a web-competent programmer to write simple GUIs for Windows without learning any new tools. I have written several simple applications which are IE/HTA in the front end, and cygwin/bash or cygwin/C in the back end.

      --

      Do daemons dream of electric sleep()?
    4. Re:Moz Extensions by pallmall1 · · Score: 1

      Yeah. Real interesting, that example.

      This page requires Microsoft Internet Explorer 4.0+ Users of other browsers can download a comma-separated values file (best viewed as a spreadsheet)

      I wonder if it will work just as *perfectly* on IE7.

      --
      3 things about computers: they're alive, they're self-aware, and they hate your guts.
    5. Re:Moz Extensions by multipartmixed · · Score: 1

      > I wonder if it will work just as *perfectly* on IE7.

      It will if they don't deprecate the tabular data control. Did you RTFS?

      --

      Do daemons dream of electric sleep()?
  4. Funny... I thought ECMAScript was an open standard by spectecjr · · Score: 2, Insightful

    ... and not something that the Mozilla guys could futz around with on a whim.

    Mind you, we are talking about the people who brought you the BLINK tag.

    --
    Coming soon - pyrogyra
  5. Dark Peer? by tunabomber · · Score: 1, Funny

    My dyslexic eyes first read "Mozilla's Deer Park" as "Mozilla's Dark Peer". I was pretty disappointed when I corrected myself. Having a P2P darknet with a XUL frontend would be pretty badass, after all.

    Oh well, time to RTFA.

    --

    pi = 3.141592653589793helpimtrappedinauniversefactory71 ...
  6. Article badly termed? by Anonymous Coward · · Score: 5, Interesting

    They're not extending javascript from what I can see. It looks like they're implementing some features that weren't implemented before.

    1. Re:Article badly termed? by rbarreira · · Score: 4, Funny

      Yeah. In other news, I don't want to shoot you, I just want to fire a gun at you...

      --

      The AACS key is NOT 0xF606EEFD628B1CA427BEA93A9CA9773F
    2. Re:Article badly termed? by rbarreira · · Score: 1
      By the way:

      JavaScript 1.5 (Gecko 1.8b2 and later): added every, filter, forEach, indexOf, lastIndexOf, some, and map methods (not part of ECMA spec)
      --

      The AACS key is NOT 0xF606EEFD628B1CA427BEA93A9CA9773F
    3. Re:Article badly termed? by Landaras · · Score: 1

      Yeah. In other news, I don't want to shoot you, I just want to fire a gun at you...

      This is veering off topic, but what the heck.

      <Stewey from Family Guy>

      "It's not that I want to kill her... I just want her not to be alive anymore.

      </Stewey from Family Guy>

    4. Re:Article badly termed? by Stauf · · Score: 2, Informative

      The point is that Mozilla is simply adding a few new functions. They've also documented the functions and released them in such a way that copying them exactly woul take no real effort. Hell, you can add the same functionality to your pages, in a completely cross platform manner by including:

      Array.prototype.forEach = function(fn) {
      for(var i =0; i this.length; ++i) {
      fn(this[i], i, this);
      }
      }

      function foo(obj, index, array) {
      alert("index " + index + " is " + obj);
      }

      [4,5,6].forEach(foo);

      ... in your javascript, for example. (thanks to neil.pearce)

      These new functions, I would think, are for the writers of extentions and themes, not really for HTML authors. But, regardless, the changes are a far cry from MS's closed additions to Java that broke code written for Sun's standard JVM. These changes to Mozilla are more akin to a new header file included with GCC or such - where if you want to use the same thing with a different tool, just copy/paste.

  7. Kettle meets Pot by Neopoleon · · Score: 4, Insightful

    Great.

    So, people used to get pissed off about Microsoft playing around with scripting features in IE that weren't available on other platforms, but now it's going to be an *advantage* for Mozilla?

    Hello-o-oo-oooo-o-ooooo...

    --
    - Rory [Microsoft Employee] | Free dirt: neopoleon.com
    1. Re:Kettle meets Pot by blinkylights · · Score: 2

      Do you really not see the difference?

      You'd really have to be completely stupid to use JavaScript in a web page that only works in one browser, even if that browser has a 90% market share. You'd have to even more stupid to use JavaScript in a web page that only works in a browser with less than 10% market share.

      I really don't think these "extensions" are intended to be used in web pages. I'm also pretty dubious of your (unintended?) implication that the folks at Mozilla are doing things to lure developers to create web sites that will only work with Mozilla the way Microsoft did back when it was leveraging its OS monopoly to kill the browser market.

      Would it help you see the difference if I pointed out that Mozilla also uses some non-standard "extensions" to CSS which it uses internally for styling the GUI?

      Which you'd also have to be totally stupid to use in a web page?

    2. Re:Kettle meets Pot by Anonymous Coward · · Score: 1, Informative

      Please ignore the Microsoft troll. (Yes, parent works for Microsoft -- click on the link to his webpage.)

    3. Re:Kettle meets Pot by Naikrovek · · Score: 1

      good point.

      counterpoint: we're not necessarily on microsoft's side.

      my counter-retort to your upcoming retort: LALALALALALALALALALALALALALALALA

    4. Re:Kettle meets Pot by Neopoleon · · Score: 1

      "I'm also pretty dubious of your (unintended?) implication that the folks at Mozilla are doing things to lure developers to create web sites that will only work with Mozilla the way Microsoft did back when it was leveraging its OS monopoly to kill the browser market."

      Sure.

      But I was responding to this line from the post:

      "Will this speed up the development of AJAX applications and give Moz a leg-up over IE7?"

      With this quote in mind, along with the fact that one of the most well known applications of AJAX out there right now was done by Google, I'd have to disagree with you. This stuff *will* be used in general web pages.

      Anyway, look at history - many web devs don't think about the impact their choices might have.

      Do you think that someone who would have willingly used a "marquee" tag is going to think twice about using some Mozilla specific javascript extensions?

      --
      - Rory [Microsoft Employee] | Free dirt: neopoleon.com
    5. Re:Kettle meets Pot by Neopoleon · · Score: 1

      "Please ignore the Microsoft troll."

      Um.

      I'm not trolling.

      It's just that I've had to watch as double-standards are applied to the company for which I work. Happens all the time.

      Zealot says: Microsoft sucks because it's a big, huge company.

      Zealot also says: I love Apple.

      WTF?

      Can't blame me for being frustrated. Whatever you might think, I'm a good guy, and it sucks to have to constantly be at the receiving end of these sorts of comments.

      "(Yes, parent works for Microsoft -- click on the link to his webpage.)"

      You don't need to go to my site to see that I work for Microsoft.

      If you look reaaaaaalllly closely, you'll see that it's disclosed in my sig.

      I've been careful since the beginning to make sure that there's no confusion at all about where my bias lies (note, however, that though I'm biased, I'm not a zealot - I run OS X and various Linux distros at home alongside my Windows boxes - are you as open minded?).

      --
      - Rory [Microsoft Employee] | Free dirt: neopoleon.com
    6. Re:Kettle meets Pot by Neopoleon · · Score: 1

      "counterpoint: we're not necessarily on microsoft's side."

      Your honesty is refreshing :)

      Anyway, regardless of whose side you take, it's just browsers in the end. It's not like any of us is curing cancer or anything.

      --
      - Rory [Microsoft Employee] | Free dirt: neopoleon.com
    7. Re:Kettle meets Pot by Nikker · · Score: 1

      Then give us the source for IE, we gave you Mozilla...

      --
      A loop, by its nature, continues. If that didn't make sense, start reading this sentence again.
    8. Re:Kettle meets Pot by blinkylights · · Score: 1

      Well, I see your point, but consider that the magic behind AJAX is in an IE-only non-standard object, XMLHttpRequest. I wonder if Google would have used it if Mozilla engineers had not already implemented a compatible object for their browser. I also imagine they had to think hard about implementing something that does not work in Safari or Opera... I know I would. These new JavaScript extensions in Mozilla are just tiny little minor things. If there were going to be a groundswell of these "marquee" people building sites that don't work in IE, it would have happened years ago when they learned they could use CSS2 and cool lookin' semi-transparent PNG's. Believe me - there is no end to how much easier, cooler and less expensive it would be to develop web pages if the clock hadn't stopped in 2001 with IE6.

      These little JavaScript things don't matter much. What you should really be wondering about is whether people will start using stuff like XForms and SVG to create places where IE can't go.

    9. Re:Kettle meets Pot by Neopoleon · · Score: 1

      "I also imagine they had to think hard about implementing something that does not work in Safari or Opera..."

      Opera? Yes.

      Safari?

      Not really.

      Safari is my favorite browser right now, but if there's one thing I've learned about it, it's that it doesn't do too well with javascript. When I'm on my mac, I do occasionally have to fire up another browser to view certain pages.

      It'd be nice if it weren't that way, but I don't blame Google, Microsoft, or Mozilla for Safari's shortcomings.

      "If there were going to be a groundswell of these 'marquee' people building sites that don't work in IE, it would have happened years ago"

      I see your point.

      "What you should really be wondering about is whether people will start using stuff like XForms and SVG to create places where IE can't go."

      We *do* have SVG plug-ins for IE.

      As for XForms...

      Well, I could always rephrase this and say that you ought to be wondering whether people will start using stuff like Avalon and XAML to create places *Mozilla* can't go.

      Personally, I'd rather the web just kept on doing its thing, leaving technologies like XForms and XAML to duke it out elsewhere...

      --
      - Rory [Microsoft Employee] | Free dirt: neopoleon.com
    10. Re:Kettle meets Pot by Neopoleon · · Score: 1

      "Then give us the source for IE, we gave you Mozilla..."

      Just out of curiosity, what does this have to do with anything?

      I'm not trying to be flippant. I only want to know how this went from "Mozilla specific extensions sounds like an interesting double standard" to "give us the source."

      --
      - Rory [Microsoft Employee] | Free dirt: neopoleon.com
    11. Re:Kettle meets Pot by MikeBabcock · · Score: 1

      If Microsoft wants to create a new standard and publish it and leave the patents open to OSS projects for licensing (one-time costs are fine by me as well -- but no limit on users), that's fine.

      If they want to create something that requires Windows or another OS for me to use it on a platform agnostic medium (the Internet), that's bad.

      HTML should render in all browsers on all platforms -- but it doesn't have to be the same. Browsers have always had slight differences and some even support the blink tag.

      These JavaScript extensions should be implementable by the MS IE crew in no time really ... to my way of thinking at least. Nobody's stopping them.

      --
      - Michael T. Babcock (Yes, I blog)
  8. On the road to Mozilla 2.0 by Phoinix · · Score: 2, Insightful

    I view these developments as steps on the road of Mozilla 2.0 It makes sense that a new major version of the open source browser includes innovations just like what Netscape did for their Navigator.

  9. Make way for the "butt-heads" by Short+Circuit · · Score: 2, Interesting

    I think we're going to see some of the same things added to IE7's Javascript engine, but implemented differently.

    Which means more special-case code for web developers.

    1. Re:Make way for the "butt-heads" by Jellybob · · Score: 1

      IAAWD

      The question springs to mind...

      "Why?"

      One of the big features MS are pimping for IE 7 is standards compliance - I'd be surprised if everything works perfectly, and they'll still be all the other versions to deal with, but I really don't see why they'd delibrately run in and implement what is essentially a few simple methods, and an implementation of a W3C spec.

      I have to say, I'm more interested in implementation of some CSS3 attributes, and the <canvas> tag.

    2. Re:Make way for the "butt-heads" by Short+Circuit · · Score: 1

      And the answer springs to mind...

      "Consistent past behavior."

      I wouldn't be surprised if they became standards compliant...that doesn't mean they can't add to their copy of the standard.

    3. Re:Make way for the "butt-heads" by masklinn · · Score: 1
      One of the big features MS are pimping for IE 7 is standards compliance
      Is it?
      Silly me, I thought it was tabs... and an "improved security" whatever that means.
      The only standard compliance thingies I saw on the IEBlog were "we fixed 4 CSS bugs" (great, now you only have to fix the tens left, finish your implementations of HTML4 and CSS1 and start implementing XHTML and CSS2.1) and "Hey, we have included full PNG Transparency support"
      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  10. Wow by TheAncientHacker · · Score: 1

    Maybe this time they'll actually not think that two digit years are automaticaly in the 20th Century.

    Or, heaven forbid, they'll actually use the actual standards based (and *GASP* Microsoft sponsored) ECMAScript as a base which had already fixed their embarassingly humerous (for a 1995 language) Y2K bug...

    1. Re:Wow by TheAncientHacker · · Score: 1

      Oh, and just to be precise, if they use a corrected base, perhaps it should be labeled that they're extending ECMAScript or ECMA Standard 262 Scripting Language or JScript since the name JavaScript was just a silly attempt for Netscape to try to glom on to SUN's Java PR machine by renaming their LiveScript language despite Java and JavaScript having nothing in common except being C derivatives written by companies that hated Microsoft.

    2. Re:Wow by Brendan+Eich · · Score: 1
      I delegated the chore of implementing the Date class to Ken Smith at Netscape, who kindly volunteered to help, and we both agreed to model it on java.util.Date, which IIRC was James Gosling's code.

      We thereby inherited obvious y2k bugs, and soon enough, Sun deprecated java.util.Date in favor of a Calendar class. But for a time, our mistake really put the "Java" in "JavaScript". :-/.

      ECMA-262 standardized these getYear/setYear methods only in a non-normative annex, and added getFullYear, setFullYear, etc., as required parts of the ECMA-262 standard. Netscape and therefore Mozilla have supported these methods since then, so I have no idea why you think Microsoft JScript differs from our implementation in conforming to the spec.

      (Clues: ECMA-262 Edition 3 specifically allows for added methods and other properties in standard objects, and backward compatibility required keeping these y2k-bug methods back when Netscape had market share.)

      Another point of confusion: many companies belonging to ECMA contributed to ECMA-262, including Microsoft. Parodying a *GASP* that no informed person would ejaculate looks like silly I'm-so-clever-I-can-defend-MS-on-slashdot posing.

      Spare us, and while you are at it, educate yourself about the history of the ECMAScript standard and its Date methods.

      /be

    3. Re:Wow by TheAncientHacker · · Score: 1

      Wow again. A person actually coming forward with pride to take credit for perhaps the last known new language implementation of Y2K violating date functions. As for why I give credit to Microsoft, well, because JScript had the FullYear functions before they were submitted by Microsoft as part of the ECMA standards effort that Microsoft spearheaded. That other companies were included in the process doesn't change the fact that it was Microsoft that fixed the bizarre choice of including 2-digit dates in a language written while the rest of the computer world was sweating date math and it doesn't change the fact that Microsoft was the one to push the standardization of LiveScript/JavaScript/JScript/ECMAScript.

    4. Re:Wow by Brendan+Eich · · Score: 1
      Why am I feeding the trolls again?

      Listen, idiot: I clearly wrote "our mistake" and put a rueful joke at our expense about "putting the Java in JavaScript", so I'm obviously not proud of cloning Gosling's y2k mistake. There's nothing there to brag about, and you must be tone-deaf to misread my post that way.

      You can toady for MS all you want, but the fact that it used standards bodies to come from behind Netscape in the mid-to-late nineties does not take away from its abuse of monopoly, and utter lack of standards-following on the web, since IE took majority browser market share.

      Of course the *FullYear methods were implemented in a version of IE before ECMA approved 262 -- MS was playing nice and leading the standards charge when it suited its business interests. Oh, and FYI: everyone involved in ECMA TG1, including Guy Steele of Sun, had the same desire to fix the y2k bugs cloned from java.util.Date, so MS (or you, if you're not working for MS) can't claim exclusive credit for such obvious fixes.

      Fullsome praise for acting with naked self-interest stands the usual ideas of noblesse oblige on their head. They're saints now for not acting selflessly? What crap.

      Microsoft has perpetrated its share of y2k-level mistakes too. No one is infallible, so snipe and suck up consistently, or again you will look like a paid toady. Or keep it up -- paid toady would be more respectable than unpaid.

      /be

    5. Re:Wow by TheAncientHacker · · Score: 1

      Let's see. You confirmed every thing I said as true: Microsoft got it right and pushed for standards. You did one of the most idiotic bugs in language history, renamed the product for deceptive marketing and fought for proprietary control and you're the one getting self-righteous. That says a lot.

  11. Re:Firefox "stuck" at 10% market share by Tatarize · · Score: 5, Funny

    I agree, lets bundle it with Linux.

    Hmm..

    --

    It is no longer uncommon to be uncommon.
  12. other web browsers by anandpur · · Score: 1

    What is the status with other web browsers Safari, Konqueror, Opera thay have little market share and say. Are thay ready?

    1. Re:other web browsers by tezbobobo · · Score: 1
      Don't even start me on this shit. I recently added one of those nifty "page last updated-3lines of code- scripts to the top of my blog.

      I'm on a mac. IE for mac displays properly; firefox displays properly; hell, even sheera displays properly sometimes. Do you think safari does - you know, my main audiece? Balls! This is like the most simple script!!!

      andt to make matters worse I can't read the letters at the bottom of this page to prove I'm not an automaton!!! AHHHHHHHHHHHH!

  13. what about the few of us stuck in no-mans land? by multi-flavor-geek · · Score: 2, Funny

    Great more exstentions, more media I want to block, ugh... Why can't anyone write something to block all of this stuff out, I don't want to see graphics, or animations, or hear sounds, I love Opera, and it is my browser of choice but I still have to deal with unwanted flash animations. I am stuck on 26.4 bps dialup, due to bad phone lines, and lack of avaliability for cable/dsl/direct wireless. I do not want or need to see more bloat in webpages.
    Ok, I am whining again, but you would whine too if you had to surf porn at 2.5 k/s.

    --
    Like arts? Like cheesy little Indie mags? Check out www.artwerkmag.com, and don't laugh at the bad coding please.
    1. Re:what about the few of us stuck in no-mans land? by Lifewish · · Score: 2, Informative

      If you're on Windows, I'd strongly recommend Proxomitron - a kickass personal web proxy that is able to strip out all the crap. If you're on Linux, there's Privoxy, or you could just use Greasemonkey (although that's possibly overkill).

      --
      For the love of God, please learn to spell "ridiculous"!!!
    2. Re:what about the few of us stuck in no-mans land? by Phroggy · · Score: 4, Insightful

      Great more exstentions, more media I want to block, ugh...

      I don't think you have any idea what you're talking about. These extensions to JavaScript will make the language easier to program in, which will be nice for the parts of Mozilla that are written in JavaScript (quite a bit, actually) and for things like Firefox extensions. It doesn't sound like they'll provide any undesirable functionality - we're not talking about floating popup windows here.

      Why can't anyone write something to block all of this stuff out, I don't want to see graphics, or animations, or hear sounds,

      That's precisely what several Firefox extensions do, and these additions to JavaScript will make extensions like that easier to write and maintain (and probably faster to use and smaller to download).

      I love Opera, and it is my browser of choice but I still have to deal with unwanted flash animations.

      Well, maybe you should switch to Firefox with the FlashBlock extension. Or if you really never want to see Flash animations, you could always uninstall the Flash plugin...

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    3. Re:what about the few of us stuck in no-mans land? by ninjaz · · Score: 1

      Someone has already written AdBlock for FireFox. Since it allows you to block page elements by pattern, you can use it to block file extensions from being displayed as well, eg., *.swf to kill all flash. It also has a panel you can open up which shows each element of the page, so you can block elements you can't right-click to select like Flash and MIDI. One of the nicer aspects is that you can choose to collapse the blocked elements, so there isn't a big blank spot on the page where the blocked element was.

    4. Re:what about the few of us stuck in no-mans land? by blue_adept · · Score: 1

      I don't want to see graphics, or animations, or hear sounds,... [snip]...Ok, I am whining again, but you would whine too if you had to surf porn at 2.5 k/s

      what kind if imageless, soundless, unanimated porn are you surfing exactly? ;)

      if you wanna convert images to text where possible, and save some bandwidth without having a butchered layout, try the anonycat web proxy, which will launch next week at anonycat.com, but you can test a beta preview here

      http://207.148.148.73:8080/demo/servlet/varsitech. anonycat.AnonycatServlet

      --

      "Is this just useless, or is it expensive as well?"
    5. Re:what about the few of us stuck in no-mans land? by Oriumpor · · Score: 1

      Back in the dark ages I used to surf primarily with Links since even images at that speed are unbearable.

      Satelite internet could be an alternative but that's only marginally better if you're expecting the responsiveness and throughput of DSL/Cable etc. Typical satellite instalations are latent anywhere between 800ms~1200ms. I've seen a couple under 600ms regularly but these were rare. Not to mention 500kbps is about as high as you can get with it.

      Direcway have been at it for a while, Starband Provides similar service as well as automated trackers aimed towards mobile installations (RVs/Vans etc.)

      The obligatory read the service contracts carefully applies to both.

    6. Re:what about the few of us stuck in no-mans land? by Oriumpor · · Score: 1

      lynx even

      P.S. If satellite is out of the question 2 and 3 phone line bonded dialup is also possible in windows and linux.

    7. Re:what about the few of us stuck in no-mans land? by multi-flavor-geek · · Score: 1

      Adblock works nice, too bad I haven't found anything nice like that for Opera, but, alas.
      I suppose the biggest benefit to salshdot is that if you whip out a problem like that you will get actual solutions to go with the ribbing you will recieve, and most of them will work. I wish I could set up a proxy, but unfortuntly I am not the only one on the network and I am not going to start to try to explain the anyone over 50 why thier websites wont work anymore.
      Thanks!

      --
      Like arts? Like cheesy little Indie mags? Check out www.artwerkmag.com, and don't laugh at the bad coding please.
  14. About standard compilance by Anonymous Coward · · Score: 3, Interesting

    Deviance from standards (at least in a web environement) is bad because the code that works in one browser won't work in another browser.

    But that's not necessarly a bad think in my opinion. If one browser starts extending and empowering web developper in many and novel ways, this browser may well raise the bar for all browsers and shit expectation (if developper find, in mass, that the features are worthwhile, cool, useful, etc...).

    However, deviance from standards are bad if they are unsignificant, unrevolutionary, unimportant, just a little improvement (not to confound with many little improvments that combined can make a big difference).

    So if you're going to deviate from standard, do it big time!

  15. The best part.. by Eloquence · · Score: 4, Interesting
    ..is the super fast back/forward cache (add a new positive Integer value browser.sessionhistory.max_viewers in about:config to enable it). My impression is that it's even faster than Opera's, though there seem to be some conditions under which a slower reload is used. In any case, this is an absolute killer feature, and I hope they manage to get it ready to be enabled by default for 1.1.

    The other killer feature is, of course, SVG support by default -- unlike the crappy Adobe plugin, fast and reliable SVG support. A lot of stuff that is currently done in Flash can be done in SVG without any dependency on non-free software (or unstable, experimental open source players). Personally, I'm most excited about its possible uses in Wikipedia. Unlike a bitmap file, an SVG can be collaboratively edited: translate text, fix mistakes, and so on. Beyond illustrations, SVG is also useful for zoomable timelines, of which Wikipedia has quite a few, and which are already exported as SVG.

    I think that Firefox support for SVG could be a major reason to switch from other browsers if we come up with cool SVG-based applications (not that we really need more reasons to switch!). One thing that would be neat is the ability to generally pan and zoom an SVG file even if there are no JavaScript controls for that, I haven't seen that functionality. Perhaps a bookmarklet or GreaseMonkey script could do the trick.

    I can't wait for the final version, but I'd be happy to wait 3 months longer if that's how long it takes to get it ready for primetime. One thing is for sure: Firefox 1.1 will kick butt.

    1. Re:The best part.. by BRock97 · · Score: 2, Informative

      I would like to second the parent's comments on SVG. I am extremely pumped this spec to be included by default in the next version of Firefox.

      I would like to add another use to the list, though. Having an SVG canvas to use for XUL apps will be a blast to play around with. As a weather nerd, I can't wait to create XUL web apps with a GIS backend that uses SVG to describe the map and weather data. Combining the XUL widgets with a vector based canvas area will be quite the combination.

      That said, I believe quite a few of these new extensions will come in handy when starting to program for these things. I, for one, welcome our new Javascript extension overlords...

      --

      Bryan R.
      The price of freedom is eternal vigilance, or $12.50 as seen on eBay.....
    2. Re:The best part.. by Saeger · · Score: 1
      So you can make firefox waste even more memory

      Caching pages is a good use of RAM, if you've got it, not a waste. It's a killer feature precisely because UI responsiveness matters. A lot.

      For years, in Opera, I've been able to use mouse-rockers to instantaneously switch back and forth between pages. In FireFox, doing the same thing is currently slug-slow and is a major reason why Opera is still my primary browser (the other reason being its quick full-page zoom with +/-).

      Anyway, if you're stuck on a system with too little RAM, you've probably got other bottlenecks to worry about.

      --
      Power to the Peaceful
    3. Re:The best part.. by mikefe · · Score: 1

      Disclaimer: I use Firefox, and used the suite before that. This is posted with Firefox on Debian.

      Firefox has memory leaks. That is a fact and the developers know about it and are fixing it; slowly.

      The hard part is finding test cases that exibit the problems without using most of the code base to render it.

      The other hard part is that there are only so many programmers (working on mozilla) that know the intricacies of debugging Garbage-Collection memory management. It is quite complex, and time consuming.

      --
      There: Something at a specific location.
      Their: Owned by someone.
      Please make sure your english compiles.
    4. Re:The best part.. by bahwi · · Score: 1

      SVG with XUL with be one of the best improvements. Dynamic Graph Stats on XUL apps and plugins. Using XUL for an internal CRM system this will be a killer and eliminate the need for excel.

      (Yes, I know excel is powerful, but when used simply and all of a sudden FF can handle it internally, no need to export to excel anymore unless they need more specific stuff, which is rarer).

    5. Re:The best part.. by masklinn · · Score: 1

      The major tab memory leak (that's been around for years now) is supposed to be fixed with Gecko 1.8 btw

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  16. Array methods by Zontar+The+Mindless · · Score: 3, Insightful

    Many of the new Array methods are similar to methods I've written myself and used for years. Admittedly the methods themselves aren't part of the ECMA spec, but object extension via prototyping is a core feature of the language. It shouldn't be difficult to implement them on your own for other browsers.

    They'll just run a bit faster in Mozilla/FireFox, is all, since they'll be run as part of the interpreter rather than as interpreted code.

    Most of the other stuff is based on W3C standards.

    Short version: I'll continue to do cool stuff quickly in Moz and spend time writing workarounds for MSIE, just like I've been doing for the last 4-5 years. Nothing particularly new about that.

    --
    Il n'y a pas de Planet B.
  17. Re:Instead of adding more and more JS hacks... by falconwolf · · Score: 1

    ...in an attempt to make more of a rich-client experience possible, why not standardize on some actual RPC implementation that works on all browsers?

    Because even "modern" browsers don't all support the same specs, at most only a small subset is supported across different browsers/platforms.

    Falcon
  18. Re:Funny... I thought ECMAScript was an open stand by slavemowgli · · Score: 3, Interesting

    Most, if not all, Mozilla extensions use Javascript, so that's most likely what these changes are aimed at. I don't think you're supposed to use them on public webpages; if the Mozilla guys really care, then they'll also make sure that these extensions won't work in that case.

    --
    quidquid latine dictum sit altum videtur.
  19. Re:Funny... I thought ECMAScript was an open stand by spectecjr · · Score: 2, Insightful

    Most, if not all, Mozilla extensions use Javascript, so that's most likely what these changes are aimed at. I don't think you're supposed to use them on public webpages; if the Mozilla guys really care, then they'll also make sure that these extensions won't work in that case.

    Funny... that exact same argument didn't work for Microsoft with their extensions to Java... why should we let Mozilla get away with it?

    --
    Coming soon - pyrogyra
  20. if you're going to deviate from standard, do it bi by falconwolf · · Score: 1

    Don't deviate from standards, extend them. Make sure standards are followed then go beyond the standards, just make sure doing so doesn't create problems with the standards.

    Falcon
  21. What the World Needs Here by Nom+du+Keyboard · · Score: 2, Insightful
    What the world needs here is a JS plug-in that works with all major browsers (or a version for each) so that there really is a compatible language across them.

    World Peace would be nice too.

    --
    "It's the height of ridiculousness to say for those 9 lines you get hundreds of millions."
    1. Re:What the World Needs Here by magicianeer · · Score: 1

      See http://dean.edwards.name/IE7/intro/ for a good start on a Cross Browser compatibility enhancing JS script.

      --
      You can have it good, fast, or cheap. Pick any two.
  22. Help mozilla beat IE? by PDAllen · · Score: 1

    It's kind of nice that the moz developers are extending the Javascript specs; and it'd certainly be nice if MS were to follow their lead.

    But anyone who thinks that this will have any impact on browser use needs to think again.

    OK, there will be a few websites that will use the new stuff and either break IE or put up a 'get a decent browser' page. But most people can't afford to throw away a vast majority of their market. So they need to write code that will work in IE; and if you've already written code that works in IE and Mozilla you won't bother redoing it just for Mozilla; even if the Mozilla-specific code could be half the length and easier to follow. So users won't have any incentive to switch to a Mozilla browser.

    1. Re:Help mozilla beat IE? by Cuntish+Sun+Executiv · · Score: 1

      Congratulations on being the 50th dickhead in this discussion to completely misunderstand why these features have been added to spidermonkey.

      --
      Solaris 10: The most advanced operating system on the planet.
  23. Canvas in Firefox 1.1 Developer Preview Release by Andreas(R) · · Score: 1
    I got pretty excited when I read about some of the new JS improvements. Mostly about the new drawing-capabilities. All the details here.

    Is is basically a direct-mode graphics canvas, as specified by WhatWG canvas specification, which allows you to draw all kinds of graphic primitives using Javascript. This is based on Apple's implemented in Safari.

    I would hope that some highly innovative graphics-applications can become possible using Javascript, when this goes mainstream.

    1. Re:Canvas in Firefox 1.1 Developer Preview Release by Anonymous Coward · · Score: 1, Informative
    2. Re:Canvas in Firefox 1.1 Developer Preview Release by neil.pearce · · Score: 1

      Heh, this guy developed his own cross-platform JavaScript VectorGraphics library, that outputs everything as DHTML statically positioned DIV blocks...
      Does lines, circle, elipses...
      Impressive, but tends to slow down your browser, somewhat.

  24. You know the answer by Anonymous Coward · · Score: 2, Insightful

    Mozilla Extending Javascript = yes (read the posting)
    Are web designers going to use it = no since they like "write once, run everywhere"
    Will extension developers use it = yes
    Will anybody remember the person responsible for Javascript in the first place?
    Well, see for yourself, a document that he maintains Roadmap

    1. Re:You know the answer by toriver · · Score: 1

      they like "write once, run everywhere"

      Or "write once, run in Windows MSIE". Bastards.

  25. Re:Funny... I thought ECMAScript was an open stand by Infernal+Device · · Score: 1

    Because there are certain things that it's not ok to do when you have a monopoly that it would be ok to do if your an underdog?

    So now we tilt the playing field in favor of Mozilla. The problem is, when do we un-tilt it?

    --
    "My God...it's full of trolls!"
  26. Javascript - blech by ucblockhead · · Score: 1

    I wish they'd extend it by replacing it with python.

    --
    The cake is a pie
    1. Re:Javascript - blech by WilliamSChips · · Score: 1

      Python's syntactically significant whitespace, although nice, wouldn't fit well in tags. You'd have to only use external files. Although something like Greasemonkey with Python would be nice...

      --
      Please, for the good of Humanity, vote Obama.
    2. Re:Javascript - blech by ucblockhead · · Score: 1

      Good point.

      Really, I just want decent OO.

      --
      The cake is a pie
    3. Re:Javascript - blech by NewbieProgrammerMan · · Score: 1

      How about "making Python available as an alternative to Javascript" instead? I could go for that. You'd probably have to tweak on the interpreter so that it's restricted to interacting with stuff inside the browser environment. I've embedded Python in other applications, and it generally isn't that hard to do, as long as you aren't worried about giving people complete freedom inside the scripting environment.

      I wonder how much trouble it would be to embed a restricted Python in Mozilla...I should probably stop thinking about it before I burn up the rest of my 3-day weekend finding out. :)

      If anybody has already tried this it would be interesting to hear about the results.

      --
      [b.belong('us') for b in bases if b.owner() == 'you']
  27. Re:Sounds familar... by sumin+k'adra · · Score: 2, Insightful

    Uh, wow. Ever heard of domain? Let's see you get ANY php to run in ANY browser : P

    lmao

    More to the point foreach is great ... it reduces the need to do things like redeclaring variables just to be used in a for loop:

    so instead of:

    var y = x.childNodes;
    for(var i=0; iy.length; i++){
    do something with y[i]
    }

    i could just do

    foreach(x.childnodes as y){
    do something with y
    }

    So getting back to the point ... why is this a Bad Thing? of course other than the fact that I can only use it in one non-existant browser : )

    Peace,
    sk

  28. Re:Funny... I thought ECMAScript was an open stand by spectecjr · · Score: 3, Insightful

    Microsoft's problem with respect to Java was that in extending it they were breaching a contract with Sun. Of course arguments about why they were doing it didn't help them; their contract didn't provide for any such exemptions. Mozilla have no contractual obligations, that I'm aware of, to implement JAvascript/ECMAscript in any particular way.

    I don't care about the case; I care about the arguments that nearly everyone on Slashdot made at the time as to why Microsoft were in the wrong - namely that they were deliberately making it harder to write cross-platform code that worked the same way everywhere.

    When asked why this was a problem when you can turn off the extensions using a command line switch, nearly everyone wrote back that it was still subverting standards, and that software developers wouldn't know the difference between writing Microsoft-specific Java code, and regular, Sun Java code.

    The exact same argument applies here. If this goes ahead, developers won't know when they're writing Mozilla Javascript code, and when they're writing standards-correct ECMAScript code.

    The amount of hypocrisy on slashdot is amazing. It seems to be like this:

    When Microsoft subverts open standards in an embrace and extend manner, it's evil.

    When Mozilla (or anyone else does it), it's great! It's good! It's expected! It's the way innovation goes forward!

    At least you guys could discuss amongst yourselves and put out a consistent message at some point. Or heck, just be honest - if it hurts Microsoft, it's A-OK by us!

    --
    Coming soon - pyrogyra
  29. Native XML is a very neat feature by MarkEst1973 · · Score: 3, Interesting
    Using Rhino http://www.mozilla.org/rhino -- which already has the E4X functionality in the runtime -- you can stuff like this (using an html document as my sample xml):

    var html = <hmtl/>
    html.head.title = "my title";

    print(html);

    This prints as:

    <html>
    <head>
    <title>my title<title>
    <head>
    <html>

    Although this is a contrived example, I find the ability to access XML as native objects using dot-notation to be very convenient and useful.

  30. Re:Funny... I thought ECMAScript was an open stand by pomo+monster · · Score: 2, Informative

    C'mon, mods, the parent poster makes a good point. It's only "flamebait" if you're ready to apologize for the hypocrisy of the Mozilla developers.

    For the record, the new methods are NOT ECMA standards, according to the Array object reference. In other words, developers relying on these methods will be locking themselves into Gecko, unless other vendors scramble to support them, which they will likely do in buggy and incomplete ways--which, incidentally, is exactly what standards (like ECMAScript) were supposed to prevent.

    I suspect we'll be seeing similar non-standard extensions to CSS and (X)HTML in the months and years to come, rendering the W3C more and more irrelevant. The standards armistice was always a nice dream, I guess, and it was good while it lasted. So much for that.

  31. Re:Funny... I thought ECMAScript was an open stand by mini+me · · Score: 1

    The problem is, when do we un-tilt it?

    That one is easy. When everyone starts using Firefox and we start liking something else.

  32. Yep, much faster. by qa'lth · · Score: 1

    In fact, so much faster that now I'll need to do EVEN MORE cross-browser compatibility testing. Yay!

    Like it wasn't bad enough with the conflicting methods in IE and Moz's javascript implementations.

  33. All this nice new stuff... by Mitchell+Mebane · · Score: 1

    ...but no inline-block. At least, not according to this page. :(

    --

    The roots of education are bitter, but the fruit is sweet.
    --Aristotle
  34. Re:Funny... I thought ECMAScript was an open stand by Anonymous Coward · · Score: 2, Insightful
    I'm well aware of the /. double standard, but the key here is intent.

    Compare the amount of IE written in Java to the amount of Mozilla written in Javascript. Compare the advantages of having a Windows-specific Java program to a 100% portable Java program. Compare the active progress of the Java standard under its developer vs. the stagnant progress of the Javascript standard, and ask yourself which language needed outside help more.

    Looks like hypocracy on the surface, but if you dissect the issue most of it goes away. That said, I'd much rather see active development of and participation in open web standards by these organizations, but none of them have even achieved full CSS2 compliance yet.

  35. Re:Slashdot post badly termed? by EvanED · · Score: 2, Informative

    You're failing to distinguish between the language and implementations of the language.

    By analogy, the C++ language has changed once since 1997 (with the technical corrigendum that fixed a couple relatively minor issues).

    However, it was only fairly recently that there has been a compiler and library that has implemented the standard apparently correctly.

    This does not mean that when a compiler writer adds support for the hell that is 'export' he or she is extending the language. By contrast, the only thing they're extending is the amount of the language their tool implements.

    I don't know what the OP was thinking, but I suspect it's along those lines.

    (Granted, from the other posts it sounds like Mozilla is in fact extending the language.)

  36. More links by jesser · · Score: 3, Informative

    This entry in Asa Dotzler's blog contains links for downloading this release candidate of Deer Park Alpha 1.1.

    The article has links to New Web Developer Features and New Extension Developer Features. There's also a page listing New Browser Features and an unofficial page listing Notable bug fixes.

    --
    The shareholder is always right.
  37. HaHaHa by badriram · · Score: 1

    you must be kidding yourself. MS added functionality to do what, not for developers to use them. Extending a standard aka EMCAScript, IS extending it, they are doing exactly what MS and Netscape did back in the day.

    But I do not mind that because otherwise we would not have font, css and many of the other things people take for granted in html.

  38. Re:Sounds familar... by zxSpectrum · · Score: 1

    So getting back to the point ... why is this a Bad Thing? of course other than the fact that I can only use it in one non-existant browser : )

    I love questions answer themselves.

  39. Avalon and XAML by segedunum · · Score: 1

    Although I think Microsoft's concept of Avalon and XAML replacing HTML is shite (and it's been tried before), AJAX has proved the concept of better client-side support within browsers. For those of us who've been using Javascript to do things like confirm webforms, create dynamic menus and load Javascript arrays with useful data for fast access over the years, we're wondering what all the fuss is about of course.

    Mozilla, Firefox, other browsers and the W3C need to make this much easier to do for web developers to make sure that Avalon and XAML never gets off the ground when Longhorn hits. They need to do what Netscape did for the web when the whole thing first took off - get there first.

    Whether IE supports it or not is Microsoft's problem, no one else's.

    1. Re:Avalon and XAML by spectecjr · · Score: 1

      Although I think Microsoft's concept of Avalon and XAML replacing HTML is shite (and it's been tried before), AJAX has proved the concept of better client-side support within browsers. For those of us who've been using Javascript to do things like confirm webforms, create dynamic menus and load Javascript arrays with useful data for fast access over the years, we're wondering what all the fuss is about of course

      Microsoft doesn't have any kind of idea or concept of Avalon and XAML replacing HTML. It's meant to be for UI implementation in Longhorn .NET Client-Side UI applications. NOT to replace all the content on the web.

      Where on earth do you get this baloney?

      --
      Coming soon - pyrogyra
    2. Re:Avalon and XAML by josh3736 · · Score: 2, Informative
      For those of us who've been using Javascript to do things like confirm webforms ...
      For the love of god, NO!!! Do not rely on client-side scripting for input validation. If you insist on doing it, you still need to do it again on the server. Failure to do this properly opens your app to bad data and even (unnecessary) security risks. It's really not that hard to alter or fake a browser's POST data.

      Hell, I'm guilty of doing this myself. When my domain registrar asked for data they didn't need, all it took was typing a few characters in the location bar (javascript:...) to completely bypass their client-side input check and submit the incomplete form--which the server blindly accepted.

      Web apps that don't do server-side input validation are simply the hallmark of an amateur.

    3. Re:Avalon and XAML by segedunum · · Score: 1

      I'm afraid you've been totally misinformed if you think this is baloney. Microsoft has exactly the intenation for XAML, with Avalon, replacing HTML within Internet Explorer.

      Where the hell have you been?!

    4. Re:Avalon and XAML by spectecjr · · Score: 1

      I'm afraid you've been totally misinformed if you think this is baloney. Microsoft has exactly the intenation for XAML, with Avalon, replacing HTML within Internet Explorer.

      Where the hell have you been?!


      Actually using betas of the stuff, for a start, unlike you - you seem to be getting all of your info from the anti-Microsoft rumor mill instead of looking for it yourself.

      --
      Coming soon - pyrogyra
    5. Re:Avalon and XAML by segedunum · · Score: 1

      For the love of god, NO!!! Do not rely on client-side scripting for input validation.

      Err, that's not what I said. For those of us who know exactly what it means, how to do it properly and exactly how far to go ;).

      Web apps that don't do server-side input validation are simply the hallmark of an amateur.

      That's not what I said either. You always perform server checks for everything that gets passed back to the server, and then there's no reason that you can't facilitate that with a better client experience for users. That's the whole point of the AJAX hoopla.

      Did I say I didn't do server-side validation? No, I didn't.

    6. Re:Avalon and XAML by segedunum · · Score: 1

      Actually using betas of the stuff, for a start, unlike you

      Then you'd know that XAML can (and will) be embedded in Internet Explorer, wouldn't you? And from then on it's a small step to Microsoft pushing and recommending it as a way to develop client-side web applications. Microsoft did try this before with ActiveX and similar efforts you know.

      Put simply, there is no reason in the world that Internet Explorer and XAML could not be used in that manner. People shouting "rumour-mill" and "scare-mongerers" doesn't alter that fact I'm afraid.

      you seem to be getting all of your info from the anti-Microsoft rumor mill instead of looking for it yourself.

      You can talk out of your arse all you like, but no matter how much Microsoft employees bang away on their blogs about XAML and Internet Explorer not being used for this it's simply bollocks. It's been tried before, it will be tried again.

      Many people around Microsoft seem to get irritated by this, and we all know why now because it's so damn obvious. There are those of us that weren't born yesterday.

    7. Re:Avalon and XAML by masklinn · · Score: 1
      You always perform server checks for everything that gets passed back to the server, and then there's no reason that you can't facilitate that with a better client experience for users.
      Virtual +1 insightful for parent, at last a guy who understands what you're supposed to do when embedding JS in a page
      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  40. Re:Sounds familar... by NutscrapeSucks · · Score: 1

    We don't even need one version of PHP. Javascript makes an excellent language for server-side scripting, and would be a worthy standards-based replacement for the proprietary & screwy PHP language.

    --
    Whenever I hear the word 'Innovation', I reach for my pistol.
  41. Restrict extensions to extensions by Doros · · Score: 2, Interesting

    I wish that Mozilla would only allow these language extensions (such as the -moz CSS properties) to work in Mozilla extensions. These are obviously useful language tools, but the web is divided enough as it is. This way, the browser extension development scene could serve as a test bed to language extensions. The new syntax and functions don't seem to have been widely tested. If somebody finds a problem with the initial release, will the next version of Mozilla have a new syntax? These extensions should be proposed to a standards organization. People need to stop dumping more undocumented, unstandardized stuff into the web. The way things are going, web developers will soon have to target 4 versions of Mozilla, 3 versions of Internet Explorer, Konqueror, 2 versions of Safari, and Opera.

    1. Re:Restrict extensions to extensions by masklinn · · Score: 1
      1- -moz- properties are standards compliant: when creating vendor specific extensions to CSS you're supposed to prefix them that way, you're allowed to extend the language as long as you don't break compatibility and follow this guideline.
      2- As for these "new" functions (that've been around for years), extending ECMAScript is allowed by the spec as long as you don't break compatibility, and they can be implemented through JS code, aka people who want to use them will merely have to do:
      if(!function_name)
      {
      // define function for browsers who don't have it
      }
      Whoa, so much work, and the definitions of these functions have only been pasted like 2 or 3 times in this thread
      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    2. Re:Restrict extensions to extensions by metalpet · · Score: 1

      This whole "adding new 'non-standard' features is bad" meme is annoying me.
      The same folks urging developers to not put anything non-standard in a browser are often the same folks that rely on JavaScript to get their job done everyday.
      That's a little bit hypocritical since javascript itself was added to Netscape 2.0 without a hint of a prior standard to validate its existence as something good or useful.
      Is the rationale that it was okay to do that in 1996, but the internet is such a mature place nowadays that there is no reason to do that anymore? Somehow I don't buy that.

      Hopefully, developers will continue to ignore people complaining about new features, and the best features will continue to become widespread enough to be recognized as de facto standards, at which point the usual standard nazis will retroactively accept said features as having always been good and proper, and quickly move on to denounce the next standard-breaking feature.

      BTW, The real reason behind web developers having to target different browers is the lack of support for old/standard features. The existence of a new feature doesn't hurt, as it is much easier to ignore than the lack of a needed feature. For example, IE supports some really cool activeX filters such as "blur" and "shadow". Has that made web developement harder for anyone? I don't think so. Quite the opposite, those same activeX filters have provided developers with an easy way to add opacity and PNG support to IE browsers which bring them a little bit closer to standard capabilities, instead of taking them further away.

  42. Mozilla and Cairo by krappie · · Score: 2, Interesting

    I think what deserves more attention is the badass development of cairo into Mozilla.

    Check out the blog of the main developer thats doing this development. Hes got some excellent demo screenshots.
    http://weblogs.mozillazine.org/roc/

    1. Re:Mozilla and Cairo by MikeBabcock · · Score: 1

      I'd rather see (and yes, I've considered doing it partly myself) a custom build of Firefox for E17 and its related technologies.

      Imlib2 can do some nice stuff, its small and fast and already uses GL acceleration when possible.

      --
      - Michael T. Babcock (Yes, I blog)
  43. who browses with javascript activated, anyhow? by dankelley · · Score: 1
    Do folks normally browse with javascript activated?

    I usually do not, since I don't want silly animations chewing up cycles, or annoying floating thingees obscuring content.

    Sure, it's annoying to have to click through menus to turn javascript or java back on for those few pages where I need it, but that's less annoying than having it turned on by default.

    1. Re:who browses with javascript activated, anyhow? by jp10558 · · Score: 1

      You mean you don't have quick preferences - F12, check/uncheck Java, plugins, and Javascript?

      Wow. Somebody ought to write an extension for THAT.

      --
      Opera, Proxomitron-Grypen,GPG 0x0A1C6EE3
    2. Re:who browses with javascript activated, anyhow? by Doros · · Score: 1

      Javascript is not just used for flare. It's also used to do useful things like check forms, download date from a server as it's needed (instead of going to a whole new page), and some useful UI features (such as collapsable elements).

  44. Re:for each!!!!! by b0lt · · Score: 1

    PHP has had foreach for an extremely long time. It has existed since PHP 4, and could be easily coded in before that.

    --
    got sig?
  45. Re:Funny... I thought ECMAScript was an open stand by ky11x · · Score: 3, Insightful

    When Microsoft subverts open standards in an embrace and extend manner, it's evil.

    When Mozilla (or anyone else does it), it's great! It's good! It's expected! It's the way innovation goes forward!

    You are not arguing with any kind of logic. I still don't understand why comments like this get modded up. Sigh. So let me break this down real slow for you.

    The problem with MS's Java extensions wasn't that they added extra functionality to the language or the VM. The problem was that they did so in a non-open manner so that no other implementation of the Java language or runtime could replicate the functionality exactly, causing breakage when developers end up using MS-specific features.

    The way Mozilla is adding features to Javascript is open. The specs are out there and the code is out there. ANYBODY can re-implement the features for complete compatibility -- including by copying-and-pasting the code into IE. Do you understand this? The boys in Redmond are NOT locked out of being able to achieve complete compatibility the way other developers were locked out of achieving compatibility with MS's extensions to Java.

    For the last time: adding features and extending platforms is NOT a bad thing. This is how innovations occur. What is evil is to do so in a non-open manner so that the extensions cannot be copied and re-implemented by others.

    Hopefully we'll not have more of these "slashdot is hypocritical" arguments. It's only hypocrisy when you don't understand what was wrong with MS's behavior.

  46. Re:Funny... I thought ECMAScript was an open stand by pomo+monster · · Score: 1

    I'm actually with you there. The important W3C standards were always pipe dreams. In reality, browser compatibility headaches persist, even between projects like Gecko and KHTML that try their damnedest to adhere to the standards. And not only has the W3C been a failure--it has also substantially set back the pace of innovation by discouraging developers and coders from trying new things. Hordes of slavish standards fanatics stand ready to pounce on you the minute you try.

    Oh, and fuck you too.

  47. My favorite extension: by mspring · · Score: 1

    solveMyProblem();
    -Max

    1. Re:My favorite extension: by stor · · Score: 1

      How about DoWhatIMean();

      Cheers
      Stor

      --
      "Yeah well there's a lot of stuff that should be, but isn't"
  48. Make out of standard obvious... by wiresquire · · Score: 2, Insightful

    IMHO, the big trap, particularly for newbies to javascript is using features/functions that are not part of the standard without knowing it.

    ie it should be very recognisable that you are using something that is not part of the ECMA standard.

    In Java land, that's made somewhat obvious by the import statement - the namespace for standard is java/javax, and, eg com.* or org.* etc are for everything else.

    Actually the same should be the case for HTML etc.It should be obvious when there are tags/features being used outside of the standard just by looking.

    The best way to let people code to standards is making it easy as hell to tell what is standard or not - without reading a gazillion pages of specs that they may not even understand.

    ws

    --

    So does Anonymous Coward have good karma?

    1. Re:Make out of standard obvious... by Maian · · Score: 1

      The documentation for those methods specifically mention that they aren't part of the ECMA standard.

    2. Re:Make out of standard obvious... by MikeBabcock · · Score: 1

      With HTML its easy -- set the standard in your header and then validate when you publish.

      If your HTML doesn't validate, you aren't following the standard you claim to follow.

      Thus all the websites with "...-transitional" headers.

      --
      - Michael T. Babcock (Yes, I blog)
  49. "Nearly everyone on Slashdot" by ElMiguel · · Score: 1

    I care about the arguments that nearly everyone on Slashdot made at the time

    I don't know why this is so hard to understand: Slashdot has around 800,000 registered users. A typical Slashdot story will have around 500 comments from perhaps 200 or 300 different registered users, i.e. around 0.03% of all.

    Let this sink in: the set of people commenting on a story will be a highly selected sample of those who care about that particular subject, and it won't necessarily be representative of Slashdot readership.

    At least you guys could discuss amongst yourselves and put out a consistent message at some point.

    Are you serious?

    1. Re:"Nearly everyone on Slashdot" by Tim+C · · Score: 1

      I don't know why this is so hard to understand: Slashdot has around 800,000 registered users. A typical Slashdot story will have around 500 comments from perhaps 200 or 300 different registered users, i.e. around 0.03% of all.

      Let this sink in: the set of people commenting on a story will be a highly selected sample of those who care about that particular subject, and it won't necessarily be representative of Slashdot readership.


      And yet you always seem to see the same opinions expressed and modded up to +4 or +5, time and time again. That takes not only the posters, but the moderators too.

      It really does get hard to shake the feeling that while the readers of slashdot have a wide variety of opinions, the Slashdot Readership is pretty much agreed on most topics.

      And no, of course he wasn't serious about that last bit.

    2. Re:"Nearly everyone on Slashdot" by ElMiguel · · Score: 1

      And yet you always seem to see the same opinions expressed and modded up to +4 or +5, time and time again. That takes not only the posters, but the moderators too.

      Moderators for a story will be self-selected in much the same way as the posters.

      It really does get hard to shake the feeling that while the readers of slashdot have a wide variety of opinions, the Slashdot Readership is pretty much agreed on most topics.

      People usually get that feeling in most cases where you've got a vocal minority and a silent majority, and yet that feeling is often wrong.

      And no, of course he wasn't serious about that last bit.

      It seemed to go with the general tone of his post.

  50. Standards? by shancock · · Score: 2, Interesting

    I guess I don't get it. If one is only developing for a private intranet and will not be accessed by any other browsers except Mozilla, then this is basically creating propriatary software where anything goes anyway. Otherwise it seems to be similar to the old Netscape/MS IE extensions war for browsers that caused so many problems years ago ( and still is causing problems).

    What happens if the company wants to scale up later to allow clients to view or to incorporate this great new stuff on the/a public website. It just doesn't make much sense to me in the long run.

    Am I missing something important here?

  51. Firefox for OS X by SideshowBob · · Score: 1

    I'll switch my OS X machines to Firefox as the default browser when it gets a little less sluggish. Hopefully the 1.1 release will make headway in that department.

  52. Deer Park by NightFears · · Score: 2, Insightful

    Damn, doesn't it sound familiar to embrace-and-ex...

    Well, let's see. Netscape invented JavaScript, Microsoft did its best to break it. But, not without the help from the Mozilla Foundation, the proprietary plot has been demolished and by now everyone, except the most lazy and ignorant, seems to know that you can't trust Microsoft's innovations to lead you to the light.

    But isn't it about the time to make another step forward? And who would YOU choose to bring you there? As for me - I, for one, welcome our new stag-headed lizard overlords!

  53. Re:Funny... I thought ECMAScript was an open stand by cowscows · · Score: 1

    Yeah, It wasn't really the "embrace and extend" thing that MS did that was bad. it was the third step, which was to not share their extensions.

    It's really a semantic argument I guess. In the confines of the term "embrace and extend", extending is something bad. While writing "extensions" to software, or suggesting "extensions" to a standard is something that happens all the time.

    Standards aren't codified to stop all development and make things boring. They're written so that there's one place and system for making extensions, and sharing them.

    --

    One time I threw a brick at a duck.

  54. cursor by protomala · · Score: 1

    I've found this interesting since some sites use images as cursors for IE, and that would be a welcome improvement to Firefox also:

    URI values on CSS cursor properties
    On Windows, OS/2 and Linux (Gtk+ 2.x) one can now use an arbitrary image as the mouse cursor while a given DOM node is being hovered. Any image format supported by Gecko can be used for the image (SVG, animated GIF, and ANI cursors are not supported).

  55. string concatenation by Tablizer · · Score: 1

    I hope they add a real concatenation operator. Using the plus sign for string concats is confusing and problematic.

    1. Re:string concatenation by laffer1 · · Score: 1

      It sure beats the ignorant . used in PHP!

      Personally, I think this is one case where microsoft did something right.. & for concatination in VB.

      Before anyone asks... a period is ignorant because its HARD TO READ in a big long concatinated string! Its also not used in most other languages making it less intuitive.

  56. Re:Funny... I thought ECMAScript was an open stand by Keeper · · Score: 1

    JavaScript != Java! Sun has absolutely nothing to do with this whatsoever.

  57. Re:Funny... I thought ECMAScript was an open stand by pallmall1 · · Score: 1

    Mozilla javascript will run on Mozilla for Windows, AND on Mozilla linux, etc. Mozilla itself is cross platform, even if some Mozilla javascript is not.

    Java was intended to be cross-platform. By corrupting the API, Microsoft attempted to wreck the cross platform centerpiece of Sun's intellectual property.

    That said, Mozilla is either standards compliant or not. Mozilla should have gotten this into the standard before incorporating it, not the other way around.

    --
    3 things about computers: they're alive, they're self-aware, and they hate your guts.
  58. XML for "Ajax" applications by edxwelch · · Score: 1

    "They also appear to have added native XML support. Will this speed up the development of AJAX applications"

    Actually, if you can use the XMLHttpRequest method you do not need to use XML at all. You can send & receive plain text data.

  59. Re:Funny... I thought ECMAScript was an open stand by destinationmoon · · Score: 2, Insightful

    They're not futzing around with ECMAScript; they're implementing parts of ECMA-357.

    This specification has been around since June 2004, look it up on http://www.ecma-international.org/

  60. Re:Sounds familar... by koko775 · · Score: 1
    Or you could do this:
    for(i in x.childnodes[i]){
    do something with x.childnodes[i]
    }

    Your argument isn't very insightful if you haven't found that you can do for(i in varname[i]) to access in sequence all of the variables in arrays or even objects.
  61. Re:Sounds familar... by sumin+k'adra · · Score: 1

    the point still stands that you have to type out 'x.childNodes[i]' instead of e.g. 'y'. But yes, thanks for the tip : )

  62. HUH? by MrChester · · Score: 1

    Wait, didn't IE do this? And all the tech-saavy people went crazy because people started using the browser specific "codes" that ended up causing incompatibilities? Let not have a double standard. We cannot blame IE for its browser specific codes, when we are doing the same thing. Besides, Mozilla has no where near the market share to really push this.

    1. Re:HUH? by soulhuntre · · Score: 1

      Let not have a double standard

      Do you not SEE the URL in your browser?

      --
      --> Fight tyranny and repression.... read /. at -1!
  63. Re:for each!!!!! by the_2nd_coming · · Score: 1

    oh yeah.. forgot because it sucked so much.

    --



    I am the Alpha and the Omega-3
  64. Re:Funny... I thought ECMAScript was an open stand by Stauf · · Score: 1

    Funny... that exact same argument didn't work for Microsoft with their extensions to Java... why should we let Mozilla get away with it?

    If you don't want to use the new functions, don't. A bit of javascript that renders in IE doesn't magically not work in Mozilla because of these new functions. Effectively, they're adding a few new functions to their standard implementation - they're not changing the way pre-existing functions work (like MS did with Java).

  65. Re:for each!!!!! by Zontar+The+Mindless · · Score: 1
    They are NOT the same thing. The JS forEach() is a method of the Array object, and is basically an analogue to PHP's array_walk() function.

    If you want something similar to PHP's foreach, you can use for ... in.

    As I've remarked in another post, implementing these methods in a cross-browser and forward-compatible fashion is not difficult if you know what you're doing:
    if(!Array.forEach)
    {
    function Array_forEach(func)
    {
    for(var i = 0; i < this.length; i++)
    this[i] = func(this[i]);
    }

    Array.prototype.forEach = Array_forEach;
    }

    if(!Array.map)
    {
    function Array_map(func)
    {
    var output = [];

    for(var i = 0; i < this.length; i++)
    output.push( func(this[i]) );

    return output;
    }

    Array.prototype.map = Array_map;
    }

    if(!Array.filter)
    {
    function Array_filter(func)
    {
    var output = [];

    for(var i = 0; i < this.length; i++)
    if( func(this[i]) )
    output.push(this[i]);

    return output;
    }

    Array.prototype.filter = Array_filter;
    }
    Test:
    function timesFive(val){ return val * 5; }

    function isOdd(val){ return val % 2; }

    var test = [1, 2, 3, 4, 5];

    alert("Array before applying function: " + test.toString()); // [1, 2, 3, 4, 5]
    test.forEach(timesFive);
    alert("Array after applying function: " + test.toString()); // [5, 10, 15, 20, 25]

    var copied = test.map(timesFive);
    alert("Array copied/modified via map(): " + copied.toString()); // [25, 50, 75, 100, 125]

    var filtered = test.filter(isOdd);
    alert("Array filtered using isOdd(): " + filtered.toString()); // [5, 15, 25]
    You've now just implemented these methods for browsers that don't support them, and they won't break in a JS interpreter that *does* have native support for them. I've used a bunch of array methods that I stole from PHP and Python in this way for ages.

    Works in any browser that supports JS 1.2 and up. Tested in Mozilla/Linux, FireFox/Windows, FireFox/FreeBSD, Konqueror/Linux, Konqueror/FreeBSD, Opera/Linux, Opera/Windows, and even MSIE.

    That wasn't so hard, now, was it?

    (I will leave passing in parameters to the called functions as an exercise for the interested reader.)
    --
    Il n'y a pas de Planet B.
  66. Re:Funny... I thought ECMAScript was an open stand by Deef · · Score: 1

    As someone who is a professional Java programmer from way back, who watched this whole thing unfold, I think that you are somewhat mistaken about this.

    The problem with Microsoft's extensions to Java was not that they refused to grant Sun permission to implement them. The problem was that the extensions were a violation of the contract that Microsoft had signed, which stated that they needed to reproduce the Java language EXACTLY as it was stated in the Java Language Specification. This is needed in order to achieve binary interoperability between different implementations of the Java language.

    The proper way for Microsoft to have added these extensions was to work with Sun (possibly paying them...) in changing the language standard, thus forcing all implementations of the standard to adopt the new features. Microsoft knew this (it's written quite clearly in the contract), but deliberately chose not to do so, and instead chose to violate their contract, presumably so that they could fragment the Java community with an incompatible version of Java (and encouraging people to write code that would only run on it) and thus prevent the community from achieving a consensus that could threaten Microsoft.

    Java, by design, is not supposed to be extended piecemeal by individual JVM vendors. It's supposed to be extended by changes to the specifications, which are then implemented by ALL the vendors. Agreeing to support this principle is a requirement of becoming a Java licensee.

    I think that Mozilla unilaterally adding features to Javascript creates exactly the same sorts of problems. I don't want to have to code web pages differently for every different kind of browser out there. Instead, the Mozilla folks should talk to the people who manage the ECMAScript standard and should get the new features added there. That way, everybody has a clearly specified, agreed-upon definition of exactly what the new feature is supposed to do, which is far preferable to everybody vaguely trying to reproduce Mozilla and other browsers bug-for-bug.

  67. Why must it work in IE when Mozilla is free? by TampaDeveloper · · Score: 1

    I don't understand this logic at all. The browser must be extended to meet the needs of its users. One of my biggest gripes is that Javascript was abandoned before it became a "complete" language. Now its forever stuck in limbo because corporations are too caught up in bureaucracy to download and utilize a FREE product? The stupidity warp around Microsoft never ceases to amaze me ...

  68. how about a native, non-blocking wait() by bofkentucky · · Score: 1

    or sleep(), delay() or whatever they want to call it, window.setInterval() is a big ol POS on a project I'm working on because I can't maintain state with it.

    --
    09f911029d74e35bd84156c5635688c0
  69. A step towards Common Lisp by fionbio · · Score: 1

    It really pleases me as a (semi-)closet Lisp programmer to see such extensions, as they closely resemble something so near to my heart, such as this or this ;-)

  70. Nice, I guess by dtfinch · · Score: 1

    Those are very handy features, but I've already written small functions to do all that, and they'll work in any browser. I try to code for the greatest common denominator.

  71. Extending is excellent by johansalk · · Score: 1

    The Microsoft analogy doesn't apply here; they sought to monoplize the market with their closed proprietary products and kill off competitors. Mozilla is different; it's open source. There's no danger of that happening with an open source product. I think It's excellent that they're extending the language; after all, innovation is welcome in open source... things need NOT stagnate, and standards can be revised to meet the needs of the times.

    1. Re:Extending is excellent by masklinn · · Score: 1

      Open Source or not is not a factor here, open specifications is, as well as staying compatible with the existing standard instead of breaking it just for the sake of giving Teh Mighty Finger to the competitor (see: Microsoft MSHTML, Microsoft JScript, Microsoft MSDOM, Microsoft JVM)

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  72. OT: units by joto · · Score: 1
    The traditional units evolved because they served a definite purpose, and they are the handiest thing for the specific job for which they were intended. A ``one size fits all'' unit doesn't fit most things very well.

    Well, that's why the SI units aren't "one size fits all". That's why there are SI prefixes. We have not only meter, but also centimeter, kilometer, etc...

    In most situations where traditional units are still used, they do not make more sense. An obvious example is the use of feet for measuring height in aviation (hektometers would make a lot more sense). And in those situations where traditional units actually are more convenient (if such situations exist), it would be much better to invent a similar unit, with a simple conversion factor into the SI system (such as half-meters, half-liters, or whatever...).

    Take a look at my bookmarks on metrification for some interesting articles on this.

    I did. And there were several interesting things to note. First, people are fairly good at rationalizing the status quo: "Because this is the way it's always been done, it must be the best way". Secondly, people are selfish: "Because I don't see any problems with measuring in hogshead/bell, I don't see why anyone else should be confused". Third, people will invent excuses to legitimate their irrational behaviour: "Even in sweden they use inches for measuring bolts" (as if they had any choice, the bolt has to actually fit the machine). Lastly, people always resist change (which happened to be the only valid argument I found)

    1. Re:OT: units by Hast · · Score: 1

      It's like the old saying: England is going metric, inch by inch.

  73. Re:Funny... I thought ECMAScript was an open stand by peachpuff · · Score: 1
    "The exact same argument applies here. If this goes ahead, developers won't know when they're writing Mozilla Javascript code, and when they're writing standards-correct ECMAScript code."

    The difference is that it's Javascript, not Java. At around the same time they were extending Java, Microsoft was also extending Javascript. No one really complained about that. They even tried to push VBscript as a replacement that did exactly the same things with different syntax. Everyone just ignored it.

    ECMAScript is meant as a bare-bones embedded language that gets extended for the specific platform. There's also a standard way of embedding it into a web browser (from a different standards body), but it started as a baseline of how the major browsers implemented it and has grown mostly by adopting vendor extensions that became popular.

    Java was designed from the ground up with a fat standard library and the motto "Write once, run anywhere."

    --
    -- . . ramblin' . . .
  74. Re:Funny... I thought ECMAScript was an open stand by masklinn · · Score: 1

    Microsoft doesn't just extend specifications, they slightly modify/break the implementation so that it doesn't stay fully compatible with the original standards.

    They did it for Java, they did it for Javascript (JScript), they did it for HTML (MSHTML) and they did it for CSS.

    --
    "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  75. Re:Funny... I thought ECMAScript was an open stand by masklinn · · Score: 1

    You guys know that xmlHttpRequest isn't part of any standard now don't you?

    --
    "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  76. Re:Funny... I thought ECMAScript was an open stand by masklinn · · Score: 1
    That said, Mozilla is either standards compliant or not. Mozilla should have gotten this into the standard before incorporating it, not the other way around.
    The ECMAScript specifications explicitely allow extensions to the standard. These Mozilla extensions are not only implementable by everyone, but they're implementable using fucking standard javascript.
    They're merely useful tools that can be replicated (with lower performances) on any browser that complies to the ECMA-262 specifications.

    xmlHttpRequest is not part of any standard and has been implemented first in IE5. Has anyone complained? no?
    --
    "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
  77. shouldn't java or sun be the one extending this? by krunk4ever · · Score: 1

    i'm not sure who created the javascript language, but like css and html, isn't there a group that controls and maintains javascript upgrades and extensions? it's nice that mozilla made some useful extensions, but unless the rest of the browser market follows, it'll become a useless feature.

    right now, javascript is @ 1.2 (i may be wrong about this). why not make a javascript 1.3 that includes these extra features. i mean, it's like microsoft ie supporting some weird formatting and standard which breaks every other browser. people complain about that, but when mozilla does the same thing, people don't?

    some are going to say, in javascript, you can check to see which browser people are using and code according. if that was the case, i'd be coding twice, one for mozilla/firefox, the one for the rest of the browsers, which basically defeats the purposes of these "extensions".

  78. Javascript is at 1.5, post misleading by markdowling · · Score: 1

    Mozilla have not "extended" the spec, merely their implementation of Javascript to take in 1.5 features.

    See here:
    http://developer-test.mozilla.org/docs/JavaScript

  79. Forgive my English, but... by moria · · Score: 1

    but do we need to consider pop-up blocker as a break of standard? It makes many JS code not work any longer, although most of us like this. Anyway, nice to see that Microsoft also catches up with us to break the standard with its SP2.

  80. Re:Funny... I thought ECMAScript was an open stand by m50d · · Score: 1

    Mozilla isn't cross platform, it's a separate platform.

    --
    I am trolling
  81. Re:A signature I have seen somewhere by sproketboy · · Score: 1

    Er, java 5: System.out.printf( "%10.2f", x);

  82. Ahh nostalgia by orionware · · Score: 1

    Remember the good old days when creating extensions to specs (MS) used to bring the wrath of the world. It's ok now hoever because Mozilla has done it!

    --


    Karma means nothing to me, so suck it...
    1. Re:Ahh nostalgia by TheInternet · · Score: 1

      Remember the good old days when creating extensions to specs (MS) used to bring the wrath of the world. It's ok now hoever because Mozilla has done it!

      Yeah, well, Mozilla's implementation is open source, so....

      - Scott

      --
      Scott Stevenson
      Tree House Ideas
  83. I STILL want MORE events... by GReaToaK_2000 · · Score: 1

    It would be freaking nice to have many of the events that IE added in Mozilla.

    DragStart
    DragStop
    RighClick

    Just to name a FEW... I see NO reason they cannot be added.

  84. Re:MathML by Forbman · · Score: 1

    Funny thing, though, fence materials (high tensile smooth wire, woven cattle wire, barbed wire, etc) still come in units of rods, even though they don't say it per say on the label. Even the european stuff (I still have a couple of rolls of Baekert green-coat high tensile woven wire sitting around, imported from Britain) is measured the same way. One roll of wire = 1 Rod in length.

    It's silly to blame most of the "old" measurements on the US, when most/all of them had their origins in European or British traditional measurements...

  85. The Tower of Babel by Dewin+Cymraeg · · Score: 1
    What's the point?

    I mean, what web developers want is standardisation, not even more differences between browsers!

    It'd be better to gain concensus when extending a language, as Sun does with Java. That way, it's a de-facto standard before anyone has even implemented it, and then can gain standardisation.

  86. Re:Funny... I thought ECMAScript was an open stand by Brendan+Eich · · Score: 1
    Don't sweat it, I'm a member of ECMA TG1 and I will take these lisp-y Array extensions to the group and propose that they be added to Edition 4.

    Standardization follows implementation here, and in many cases. Where standardizers wait to implement, and instead design on paper and by consensus, you usually get something bigger, slower, and later than if implementors had competed, or taken first base by moving fast and doing a good enough job.

    I'm hoping to avoid design-by-committee bloating ECMA-262 Edition 4. Wish me luck!

    /be

  87. Re:Funny... I thought ECMAScript was an open stand by pomo+monster · · Score: 1

    Sounds like we're on the same page. Good luck. :)