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...
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...
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...
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...
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...
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....
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 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 ...
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...
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...
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...
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" /...
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 ...
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...
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?
...
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.
...
I suspect I need to add an Ant task somewhere, but where?
...
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?
...
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...
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...