javascript

Latest

  • AdLib: Apple's secret web app weapon

    by 
    Mike Schramm
    Mike Schramm
    04.09.2010

    MobileCrunch noticed something interesting about the iPad User Guide hidden in the iPad Safari's bookmarks. It's a web app, but it doesn't feel like a web app -- the views scroll independently and smoothly, "clicking" is exact, and the whole thing runs much more like a native iPad app than anything web app developers have been able to put together yet. Why? Apple's got a secret -- Done21 is calling it "AdLib," after a file found somewhere in the source code, and apparently it's a library that connects UIKit to HTML, CSS, and Javascript. It's a go-between framework that has no documentation in the code at all, and uses practically unlabeled variables. In other words, Apple is putting their own magic into web apps, and while the code is there to see, they aren't interested in sharing. At this point, it's not much more than a novelty -- Apple obviously is depending on Xcode and the iPhone OS SDK for developing iPad and iPhone applications, and there's no need for them to share the code magic that's making this happen. But it's interesting when you think of the original emphasis that Apple placed on web apps way back in the early iPhone days. If all of those web apps we had were as well-coded and responsive as this -- in other words, if they'd actually had ties into the UI -- then maybe web apps would have been just enough.

  • Chrome brings Flash Player into the fold, trains it to kill iPads?

    by 
    Sean Hollister
    Sean Hollister
    03.30.2010

    If Apple had its way, we expect that the iPad would go down in history as the device that nearly single-handedly destroyed Adobe's empire of Flash. While HTML5 has been in development for years, content providers like the Wall Street Journal, NPR, CBS and more have only begun transitioning video services to the new standard (and subsequently, away from Flash) now that it's time for Cupertino's big release. But this week, Adobe has found an ally in Google, which has just announced that the Chrome browser -- and more importantly, Chrome OS -- will not merely support but natively integrate the technology. In the short run, what this means is that the Chrome browser won't require you to download Adobe Flash Player or spend time updating it before back-to-back YouTube viewings and marathon Newgrounds sessions. In the long run, Google explains that it intends Flash to become an integral, seamless part of web design up there with HTML and Javascript -- and if we extrapolate, an integral part of its new Chrome OS as well. Pardon us for thinking out loud, but it sounds like Google's found an exclusive feature to highly tout, when it inevitably brings a Chrome OS tablet to market. [Thanks, Adam]

  • Internet Explorer 9 to sport GPU acceleration and HTML5 support

    by 
    Vlad Savov
    Vlad Savov
    11.20.2009

    Even if you don't have a favored fighter in the browser wars, you have to admit Microsoft's Internet Explorer has been looking mighty unfit over the last few years. Younger and fitter contenders like Mozilla's Firefox and Google's Chrome have arguably overtaken the old stalwart, and now Microsoft is making some much-needed noise about fighting back. The software giant has been giving developers and curious journalists a very early peek into its IE 9 progress at PDC, with its stated ambitions including faster Javascript (see table above), HTML5 support, and hardware acceleration for web content. By harnessing DirectX and your graphics processor, the new browser will offer improvements in text readability and video performance, as well as taking some of the load off the CPU. Development has only just got under way, mind you, so there's still plenty of time to screw it all up. Or make it awesome.

  • Cycript: Blending Objective-C and JavaScript

    by 
    Joachim Bean
    Joachim Bean
    11.18.2009

    Cycrypt is a new project that blends Objective-C and JavaScript to make it easier to implement aspects of both together. It's going to be great for using elements that JavaScript offers when programming with Objective-C. It's similar to JSCocoa, but it's been designed to offer a more complete set of JavaScript commands. It offers a full JavaScript parser/serializer, which allows for extensive use of JavaScript coding. If you're wondering what exactly this is, the Cycript page offers some examples of code written with Cycript. Basically, it allows you to implement full JavaScript commands, while working with Objective-C in the same project. Cycript is dependent on the MobileSubstrate and libffi libraries, which are available in Cydia. This won't be used to develop applications in the App Store anytime soon. If you're interested, you can download examples or releases of Cycript. It's still being worked on, but if you're developing with both Objective-C and JavaScript in a project, you should check it out.

  • Weather Widget with time, updated for Snow Leopard

    by 
    TJ Luoma
    TJ Luoma
    09.27.2009

    Back in 2005, John Gruber wrote about Hacking Apple's Weather Widget to Show the Time of the Last Update. I was disappointed to learn that my customized Weather widget no longer worked in Snow Leopard, and for some reason John's instructions no longer worked for the Snow Leopard version of the Weather Widget. The culprit seemed to be the JavaScript that John had modified to calculate the time. Unfortunately I don't speak JavaScript, but with a little help from Google I was able to find a workaround which will enable this tip to work again.

  • Inside the new iTunes LP format

    by 
    Tim Wasson
    Tim Wasson
    09.15.2009

    With the release of iTunes 9 came iTunes LP. Our own Dave Caolo gave iTunes LP a glowing review, but if you're wondering just how Apple worked their magic with the new format, web developer Jay Robinson has picked it apart thoroughly. As it turns out, simply replacing the ".itlp" extension with ".zip" reveals the contents of the package, which are actually HTML, CSS, and a little JavaScript. The Flash-like interfaces really use no Flash, but instead rely on the proposed CSS3 animation properties. If you're a web developer like yours truly (or a few other TUAW bloggers), you'll definitely want to check out Jay's analysis of the format. We've also been informed by a loyal tipster that if you take that unzipped folder of content and put it in your Sites directory (with Web sharing turned on, naturally), you might try browsing to it from your iPhone or iPod touch and seeing what shows up in Mobile Safari. Fascinating.

  • From Firefox to Safari (and back again)

    by 
    Robert Palmer
    Robert Palmer
    06.29.2009

    I realize I may not be your average browser user. As a web developer, a browser to me is two parts daily use, two parts testing, and one part challenge. Since 2005, I've been using Firefox in some form or fashion as both my primary browser and as a testing vehicle. I had recently started a JavaScript-intensive project, and I appreciated Safari 4's lightning-fast JavaScript execution speeds. In Firefox, I rely mostly on add-ons like Web Developer and Firebug to help me analyze and test for mistakes in websites I build in Firefox. They work great, but enabling them slows the browser down. That's why I was excited for the updated Web Inspector that comes as part of Safari 4. (Yes, Safari 3 first came with Web Inspector, it couldn't hold a candle to Firebug's Swiss Army knife of an add-on for Firefox.) Testing was easy, and Safari 4's Web Inspector's many improvements made me think I could migrate to Safari full-time. Read on to see how it went.

  • Google Chrome developer preview (unofficially) released

    by 
    Robert Palmer
    Robert Palmer
    06.05.2009

    Digg's Kevin Rose, perennial purveyor of information that just "fell off the back of the truck" shared a link early this morning to Google's new, supercharged, Webkit-based browser -- for Mac. The new browser, Chrome, is clearly marked as a developer preview, and not meant for general browsing. In fact, as a good Mac citizen, it will refuse to set itself as your default browser. It scores a 100 on the Acid3 test straight out of the box, but doesn't pass: it fails something called the linktest, which involves interacting A tags and IFRAMEs. A little research suggests that it could be a bug with Webkit. If that's true, then it's a bug that Safari 4 beta has fixed. Chrome appears to have Flash (and other plugin) support disabled as well. JavaScript support, however, is fully functional. While Chrome performed much better than Firefox on this cursory test, it still didn't beat Safari 4 by a long shot. While only a beta, its performance is respectable and sure to improve. Again, Google Chrome isn't for everyone, but if you're a web developer who needs to keep up with the bleeding edge of browser development, then this preview should be stable and reliable enough for you to test what you need to. Read through for the full JavaScript test details. Thanks to everyone who sent this in!

  • NimbleKit: Native iPhone apps with HTML and JavaScript

    by 
    Brett Terpstra
    Brett Terpstra
    05.27.2009

    If you're packing a little JavaScript-fu but not much Objective-C knowledge, and itching to jump on the App Store bandwagon, NimbleKit may be the answer you're looking for. By providing its own API on top of Cocoa Touch, NimbleKit allows would-be developers to access core iPhone functionality with Javascript functions. You can build an entire application using an HTML template with embedded Javascript, compile it and run it on your iPhone/iPod touch. I've tried it out; it's pretty slick. NimbleKit provides functions for placing buttons, progress indicators, text and other native interface elements programatically. You can also do some styling with the HTML. Functions are available to stream Internet-based or embedded audio, search contacts, and read and process local and remote documents. The demo version of the development kit lets you run it through all of its paces, only stopping short of running it on your device. You can build and test in the iPhone Simulator to your heart's content before making a purchase. NimbleKit is ideal for a range of application types. You can't expect to make a wicked, animation-laden video game with it, but you can rapidly prototype and develop more static interfaces and basic functionality. While there's a good deal of power available, it does put you in an either/or situation. If you have a little Objective-C in your blood, you might become frustrated, not being able to tap NimbleKit's functionality from outside of the HTML setup. It's definitely, at this point, geared toward rapid development of iPhone apps by Javascript coders. As I mentioned, NimbleKit is available to try with full functionality. You'll need Xcode installed with the iPhone SDK, and you'll still need to be a registered developer to get an app into the App Store. Since the iPhone SDK allows you to test on the Simulator without registering as a developer, you can actually put the entire process to the test before spending a cent (well, after the purchase of a Mac and the broadband line you'll need to download the SDK ... ). NimbleKit can be licensed for a one-time fee of $99, and a licensed copy can be used to create as many apps as you want. A project template is included with the kit to get you started.

  • iPhone OS 3.0 brings the speed for JavaScript

    by 
    Victor Agreda Jr
    Victor Agreda Jr
    03.27.2009

    Ars is reporting the 3.0 speed improvements to Mobile Safari's JavaScript engine range from 3x to 16x -- a blessed boon to web developers everywhere. No one seems to know if Mobile Safari will be sporting Nitro or SquirrelFish or what, but whatever it is, it'll be faster. If you check out the benchmarks originally posted on Wayne Pan's blog, iPhone OS 3.0 blazes past 2.2 in every category except divisions (the benchmarking tools are available at Craig Hockenberry's blog here).It's nice to see progress, but I don't think anyone expected Apple to let the JS engine in Mobile Safari lay fallow for long. Every day browsers like Opera Mini and Android's WebKit-based browser are getting better. Heck, even WinMo's version of IE is supposed to support H.264, Flash and Silverlight. Will the upgraded js engine and technology like CSS3 and Canvas draw more developers to iPhone web apps? I doubt it, but the speed improvements will make many browser-based services feel more responsive. That's certainly a win for consumers.

  • Acrobat vulnerability may affect Mac users

    by 
    Michael Rose
    Michael Rose
    02.20.2009

    As if the baked-in security issues weren't enough to deal with, Adobe has announced today that all versions since v7 of Acrobat and Acrobat Reader on all platforms -- including Mac OS X -- are vulnerable to an Javascript exploit that can crash Acrobat. [Correction, per The Register and Shadowserver the vulnerability is not in Javascript per se but the circulating exploits use Javascript to leverage the actual flaw. Thanks to Adam Engst for the heads-up.] The same approach could possibly give an attacker unrestricted access to the target system. More from Download Squad on the scope of the problem; Adobe and others are reporting that there are already exploits in the wild for this problem.Mac users have, of course, a very solid option for handling PDF files other than Acrobat: Preview, installed on every Mac OS X machine. You can also turn off Javascript support in the Acrobat preferences to lock out exploits from proceeding beyond crashing the app to actually doing widespread damage.To change the default handler for PDF files, select any PDF file in the Finder and then select Get Info from the File menu. Under the Open With section, select Preview.app and then click Change All.

  • Samsung / Yahoo Internet@TV widgets revealed

    by 
    Richard Lawler
    Richard Lawler
    01.05.2009

    Samsung and Yahoo! promise the Best of the Web on select 2009 HDTV models, thanks to the Internet@TV widgets we snuck a look at a few weeks ago. Developers build Javascript and XML apps that then run directly on your Samsung HDTV, starting with USA Today, YouTube, eBay, Showtime and Yahoo properties like Flickr and Yahoo! News. Next up their sleeves? Video streaming and "other popular Internet services" running through the built-in Ethernet or optional Wi-Fi USB dongle. Also, unlike some others, the Internet@TV Content service isn't just a U.S. thing, headed to 12 other countries this year: Canada, Mexico, United Kingdom, Germany, France, Italy, Spain, The Netherlands, Denmark, Norway, Sweden, and Finland. Having the Internet no further away than the nearest remote was your biggest request for '09, right?

  • Opera: Apple won't let us in the App Store

    by 
    Robert Palmer
    Robert Palmer
    10.31.2008

    Opera Software CEO Jon Stephenson von Tetzchner said in a New York Times interview yesterday that its engineers have developed a version of the Opera web browser that works on the iPhone, but Apple has rejected it for the App Store because it competes with Safari. This isn't unprecedented: Apple rejected an app called Podcaster possibly because it duplicates functionality in an upcoming version of the iPhone software. Podcaster was (for a time) available via ad-hoc distribution before that, too, was shut down. Daring Fireball's John Gruber suggests that Apple rejected Opera because the browser included its own JavaScript interpreter, something forbidden by the iPhone SDK developer agreement. Opera makes two flavors of its mobile web browser: Opera Mini for most mobile phones, BlackBerry, Palm, or Windows Mobile; and Opera Mobile, a more featured version for Symbian and Windows Mobile. A beta version of Opera Mini for Android is also in development. Update: Gruber used his massive Rolodex over the weekend to determine through an unnamed source that the app may not have even been submitted to the App Store. Huh.

  • Sony touts PS3 internet browser as better than Internet Explorer

    by 
    Andrew Yoon
    Andrew Yoon
    10.27.2008

    The internet browser on the PS3 got a nice facelift in firmware 2.50. The addition of Flash 9 support makes browsing on the web much more entertaining, as many sites that implement Flash video can be properly viewed on the console. Apparently, implementing Flash 9 on the PS3 was quite a challenge, as it required the use of one of PS3's SPUs.The use of additional processing power should help enhance the browsing experience, making it less sluggish than before. Sony also made changes to the way the browser implements JavaScript, with a 280% increase in performance there. The changes are so drastic that SCE's Shinji Noda believes the PS3's internet browser beats Internet Explorer 7.While this may be an achievement to the Sony firmware team, we're doubtful many use their PS3s regularly to browse the web. Regardless, we're glad these changes were made: it's so much easier to browse PS3 Fanboy on firmware 2.50.[Via IGN]

  • Screaming fast Mozilla browser Minefield gives a glimpse of Firefox's future

    by 
    Jason Clarke
    Jason Clarke
    10.26.2008

    I was really disappointed when Google released their Chrome web browser for Windows only. When it comes to browsers, I've tried them all. Right now I regularly switch between Firefox and the latest nightly build from Webkit (essentially Safari). Firefox has the extensibility I rely on, while Webkit has the performance I crave. I had hoped that Chrome would magically combine those two crucial traits and become my new go-to browser. Unfortunately, Chrome is not yet nearly as extensible as Firefox, and isn't available for Mac (yet). So imagine my surprise when I stumbled upon the latest experimental Firefox build from Mozilla, called Minefield. This Minefield should not be confused with the unofficial optimized builds of Firefox that Brett wrote about, which are also referred to as Minefield. Minefield is Mozilla's code-name for this generation of Firefox, and the code name is used for unofficial builds to avoid infringing upon the Firefox name. So, what's so special about the Mozilla Minefield build? It's fast... smokin' fast. This is essentially a version of Firefox with the new TraceMonkey JavaScript engine under the hood, and as Ars Technica reports, it tests even faster than Google's V8 JavaScript engine. As most Mac users have noted, Firefox is kind of pokey on the Mac platform, particularly compared with WebKit or even Safari, and even when compared with Firefox on a similarly spec'd Windows machine. Version 3 of Firefox was supposed to fix the performance problem, and while it's somewhat better, it's still not great. Well, Minefield is great. Using Gmail or even a complex content management system is a breath of fresh air. I feel like my web apps are finally keeping up with me.There's one caveat, and it's a big one: though the current version number is 3.1b2pre (the "b" denoting beta status), this is really alpha software. That means there will be bugs, and you will experience problems. Surprisingly, though, Minefield has been very stable in my testing -- not yet crashing in a full day of testing. I have restarted it a couple of times due to suspicion that something strange was going on, but I can't say for sure if it was. If you use it with your regular Firefox profile rather than creating a new one, Minefield will complain that most of your extensions are not compatible. Using Nightly Tester Tools, I re-enabled all of the extensions that it disabled, and every single one of them appears to be working normally, even the complicated ones like Better Gmail 2 and TabMixPlus. I've only had a problem with one site so far, but unfortunately it's a big one: Google Docs. The page simply won't load. But for now, I'm willing to open WebKit or Camino to edit my Google Docs, because I'm just too smitten with the raw speed that Minefield offers. One last note: being a nightly build, you will likely find that new versions are available, well, nightly. Mozilla makes the process of upgrading to the latest version virtually painless by using the built-in version monitoring process that Firefox uses. [via Ubuntu Unleashed]

  • JSCocoa 1.0, write Cocoa apps in Javascript

    by 
    Brett Terpstra
    Brett Terpstra
    10.09.2008

    Do you want to write Cocoa applications, but happen to be handier with Javascript than with Objective-C? JSCocoa to the rescue! Similar in concept to RubyCocoa, JSCocoa provides a bridge between Webkit's JavascriptCore and Cocoa, allowing you to call C and Objective-C code, as well as build Javascript classes which inherit from Objective-C classes. Visit the Google Code page for a quickstart and some syntax explanations. JSCocoa is open source and available for subversion checkout or direct download.

  • Google creating its own browser based on WebKit

    by 
    Robert Palmer
    Robert Palmer
    09.01.2008

    Google is developing a new web browser built from the ground up and based on WebKit, the same rendering engine that Safari uses. The browser, called Chrome, is open-source software built with security, compatibility and speed in mind. Each tab in the browser will be its own separate running process. For example, if JavaScript hangs in one tab, the other tabs will remain unaffected. The approach is similar to the way Mac OS X isolates applications in their own private areas to prevent one crash from taking down the whole system. Google picked an interesting way of announcing the project: They commissioned illustrator Scott McCloud to draw a 38-page comic book about the project, and distribute it under a Creative Commons license. The result is a very readable, fascinating way to learn about the new browser. For web developers, Chrome will include strong Gears integration, and a JavaScript virtual machine that generates super-fast machine code out of JavaScript instructions. For end users, it will include a new start page that lists the last several pages and search terms you've used. It also includes a private browsing mode. Google is planning on formally launching the project on Wednesday, but the Chrome website isn't visible to the public yet. Update: Google is releasing a version for Windows tomorrow, with Mac and Linux versions coming soon, once Chrome is "faster and more robust." (Thanks, Bryan!) [Via Macworld]

  • Take back your iWeb galleries in Firefox 3

    by 
    Cory Bohon
    Cory Bohon
    06.23.2008

    Just as Firefox users were upgrading to version 3 last week, many people started to miss their iWeb-created galleries as they just disappeared. Well, one iWeb user has been doing extra work to fix Apple's? (erm... Mozilla's?) problem. Joshua Ochs has posted an in-depth article on his site describing exactly what is going on -- he also provides a fix in the form of a script to patch iWeb. Joshua says that the problem is neither with Apple nor Mozilla, but with a JavaScript library called "Prototype" which is used by iWeb. Right now there are two ways to fix the problem (neither of which are supported by Apple): you can use the information on Apple's Discussion Board, or you can download Joshua's script -- both seem to work and are free.[via ArsTechnica]

  • New .Mac galleries leverage open source frameworks

    by 
    Scott McNulty
    Scott McNulty
    08.07.2007

    The .Mac galleries got a lot of time today in Steve's presentation, and for good reason. Though I won't be dropping Flickr any time soon, the .Mac galleries are very cool looking and have some very nice features (the 'photo skimming' is a nice touch). It would seem that Apple leveraged some Open Source goodness in order to get these galleries up and running. According to the SproutIt blog Apple is using the SproutCore application framework, and has contributed back a number of enhancements to the project.A quick peek at the code of a gallery confirms that Apple is using SproutCore (just search for sproutcore.js) as well as script.aculo.us (a set of open source javascript libraries that handle things like animation). If that's isn't Web 2.0 enough for you, I don't know what is.

  • iPhone bookmarklets

    by 
    Mat Lu
    Mat Lu
    07.19.2007

    Over at LifeClever they had the in retrospect obvious, but nonetheless brilliant idea that you can use javascript bookmarkets with your iPhone. Bookmarklets are basically little bits of JavaScript that can perform various functions in your web browser. So, for instance, del.icio.us offers bookmarklets for posting links to their site. Anyway, LifeClever has put together a list of their 17 favorite bookmarklets for the iPhone.These include a nice find text on this page bookmarklet, as well as others for searching on various sites, translating, YubNub, etc. These look pretty cool, and really do add some missing functionality to your iPhone.