google-closure

getting started with Google Closure if you don't care about minifying/compiling?

If you don't care about minifying your code, is there a way to get started using the Google Closure library without having to set up a subversion client and use the compiler? The Notepad sample program on Google's website refers to <script src="closure-library/base.js" > </script > Can you simply download closure-library/base.js s...

Php error in closure compiler execution

When I run php-closure i get a PHP error Undefined index: HTTP_IF_NONE_MATCH in <b>/php-closure.php</b> on line <b>183</b> Line 184 of php-closure is trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) { This error only happens when closure has already written the compressed javascript file to the directory once, if the directory is em...

CustomRenderer for AutoComplete using google closure library

I'm looking to use one of the AutoComplete subclasses(Rich,Remote,RichRemote) and I'd like to use a CustomRenderer, however I don't see instructions for this and reading the documentation/source it appears that the Remote subclass is instantiated with a renderer of "var renderer = new goog.ui.AutoComplete.Renderer();" leaving me no optio...

JavaScript-library-based Project Organization

Hello, I'm very new to the JavaScript library world. I have used JS by itself before to create a mini social network but this is the first time I use a JS library and I really don't know how to go about this. I'm planning to use Google Closure and I'm really not sure how I should go about organizing the code. Should I put everything in...

Documentation generator for Google Closure Javascript

I want to generate a HTML-Documentation for my Javascript code. The comments in my code are written in a format, the Google Closure Compiler can use to optimize my code. Example: /** * Class for handling timing events. * * @param {number=} opt_interval Number of ms between ticks (Default: 1ms). * @param {Object=} opt_timerObject A...

Why does Google's Closure Compiler leave a few unnecessary spaces or line breaks?

I've noticed that every time I use Google's Closure Compiler Service, it leaves a few unnecessary spaces in the compiled code presented on the right-hand side of the page. These correspond to line breaks in the hosted version of the compiled code. For example (note the line breaks, each of which seems unnecessary): http://troy.onespot....

Preventing closure compiler from renaming certain variables

I have a javascript file with a global object that must not be renamed (_gat from the Google Analytics async tracker). This object must not be renamed by the Google Closure Compiler as Google Analytics looks for a variable with this specific name. I've looked into the Javascript Doc notations that are mentioned: http://code.google.com/...

How do I use Google Closure compiler to remove used JavaScript code?

How do I use Google Closure compiler to remove unused code? I am using the JQuery Slider control but am not using anything else within JQuery. So I read that Google Closure compiler in Advanced mode can remove unused code, but I don't know how. I have frontpage.html that links to an external JQuery, JQuery UI and JQuery Slider control ...

Google Closure Compiler with jQuery applications

I have a lot of time invested in jquery and a large application built with it. Recently I've been reviewing Google Closure Library, but at this time have found it to be not nearly as elegant as jquery. I believe it may have some potential and will look into it more, but for now I intend to continue using jQuery as my base framework. How...

Disabling graphic element selection in VML and Internet Explorer

I have a JavaScript application that lets users move shapes around a drawing area, and I happen to be using the Google Closure library. In FF/Safari all is good. In IE, as graphic elements are moved, they get selected by the browser (both the moving element and other elements), showing colored dotted background around some elements in un...

Graphic elements not assigned parent elements on Safari iPad when using Google Closure

I'm using Google closure to create a simple interactive graphic in HTML/JS to be viewed on iPad Safari. The code sample below shows expected behavior on Safari Mac and all other major browsers (a circle appears that when clicked generates a console message), but not Safari iPad. No event handler is registered with the circle. Instead, a...

Google Closure MSBuild Task Error

I am trying to write a custom task in my MSBuild file to compress some js files with Google Closure Compiler. I downloaded the ClosureCompiler.dll and ClosureCompiler.tasks files from the site and have kept them in a folder on my m/c. I added the below lines in my csproj file <Import Project="C:\Projects\Closure\ClosureCompiler.tasks" /...

User Google Closure to lazy load javascript

I'm especially liking the ability to require other javascript classes by using Google Closure, but I'm wondering if it's possible to use goog.require to lazy load other javascript classes. When I trying using goog.require after the page has loaded, it seems to refresh or go blank :( Any way to get a script on demand, and maybe set it up ...

Is there a way to generate Javascript API documentation like the Google Closure Library API Documentation?

I'm trying to find a tool that generates HTML documentation for my Javascript source code. Does anyone know if the tool that Google uses to generate the interface at the following URLs is open source? Would I be able to generate similar output? http://closure-library.googlecode.com/svn/docs/class_goog_proto2_Serializer.html http://c...

Using Google's Visualization API and Closure to generate a BarChart.

I have a web page that uses Google's Visualization API to generate a timeline but now that I'm trying to add some jQuery stuff to it, things are falling over. So, I'm trying to do it with Closure. However I can't seem to find any examples of how to use the Visualization API under Closure. Does anyone know where I can find any examples? ...

Use Google Closure Compiler as a library instead of a script

Is it possible for me to write my own Java Main Class that calls methods in compiler.jar. I would like to make multiple calls to the compiler and do not want to write code to use Runtime.exec and also do not want to have to wait for Java to load up before every call. ...

How do I get closure compiler configured to run on Google App Engine Java

I suspect I need to add an Ant task somewhere, but where? ...

Is it possible to use Closure Compiler ADVANCED_OPTIMIZATIONS with jQuery?

I keep getting errors that the function (renamed) does not exist for the given object. Is there a release or setting or something to make it work? ...

compiler.jar compile list of files simple in one exec

Is it possible to provide a multiple source files each with their own destination file in a single command? That way Java won't have to load up for each file I compile. I am using SIMPLE_OPTIMIZATIONS. I know there are better ways than the one at a time,, but they all seem to require code modifications which I take too much time for the...

WARNING - dangerous use of the global this object

In Google Closure Compiler I get the warning WARNING - dangerous use of the global this object Here is an example. The error line and offset refers to the beginning of the word this function aToggle() { if(shown) toggle.show() else toggle.hide() $(this).text(shown ? 'Click to hide' : 'Click to show') shown = !shown...