Questions tagged [google-closure-library]

Closure Library is a JavaScript framework used by Google and one of three components to Closure Tools, an open source toolset to aid with developing front-end web applications

Important links:

374 questions
5
votes
4 answers

Closure Library or YUI 3

I'm architecting an enterprise web application using python, django. My final decision to make is which javascript library to use. I'm thinking about using Google's closure library or YUI3. Most of the development, I've used jQuery.I can code fast…
CIF
  • 1,754
  • 2
  • 18
  • 30
5
votes
1 answer

Using Google Closure Templates with jQuery

We are starting to create an application using JavaScript and HTML5 which will use rest API to access server resources taking the advantage of jQuery awesomeness and easiness which our dev team is already comfortable with. This application is going…
IsmailS
  • 10,797
  • 21
  • 82
  • 134
5
votes
2 answers

Mobile touch support -- In Closure-library

I was just wondering if we have a specific library or framework built on the closure-library , which is specifically designed for touch devices(Android or Ipad). I already have my web-app using the closure-library, now want to maintain consistency…
5
votes
1 answer

Closure compiler dependency calculation much slower than closurebuilder.py

Previously, I have been using the following build script in order to compile a Closure project: # BUILD SCRIPT 1: closure-library/closure/bin/build/closurebuilder.py \ --root=closure-library/ \ --root=src/ \ --namespace="entrypoint" \ …
Mala
  • 14,178
  • 25
  • 88
  • 119
5
votes
2 answers

Test if object is implementation of interface in Google Closure class framework

How can I test if an JavaScript object is an implementation of an interface using the Google Closure inheritance mechanism? I could not find any hint of my.Animal in the objects created via new my.Dog() and object instanceof my.Animal didn't work.…
5
votes
1 answer

ClojureScript format string with goog.string.format doesn't substitute

I'm trying to format a color in hex for use in HTML, running ClojureScript in the browser. Here's my "format" function. (defn gen-format [& args] (apply gstring/format args) ) in a "strings" namespace where I've required the goog.string library…
interstar
  • 26,048
  • 36
  • 112
  • 180
5
votes
3 answers

Why create a temporary constructor when doing Javascript inheritance?

Why does goog.inherits from the Google Closure Library look like this: goog.inherits = function(childCtor, parentCtor) { function tempCtor() {}; tempCtor.prototype = parentCtor.prototype; childCtor.superClass_ = parentCtor.prototype; …
Paul Draper
  • 78,542
  • 46
  • 206
  • 285
5
votes
3 answers

Is there a typescript definition file for google closure library?

I'd like to use google's closure library in my typescript based environment and I wonder if there is an existing type definition file for the library? I know that there is a converter for the opposite (i.e. a converter from typescript to closure)…
nrydn
  • 75
  • 6
5
votes
3 answers

How can CSS be applied to components from Google Closure Library?

I'm getting my feet wet with Google's Closure Library. I've created a simple page with a Select Widget, but it clearly needs some styling (element looks like plain text, and in the example below the menu items pop up beneath the button). I'm…
Jason
  • 2,025
  • 2
  • 21
  • 13
5
votes
3 answers

Hide Google Library's warnings

I'm using Google Closure and Google Library with my projects and I'm meeting troubles with warnings. My project is made of ~50 files with somme small warnings (JSDoc mistakes). The problem is Google Library, when I'm compiling my project, a huge…
Louis
  • 51
  • 2
5
votes
1 answer

Browser displayed favicon blinks on hash change

When I change the hash location via document.location.hash or window.location.hash, most browsers have some form of a 'blinking' effect. I need to prevent that, as I am implementing a history plugin based on hash changes and the 'blinking' effect is…
flavian
  • 28,161
  • 11
  • 65
  • 105
5
votes
1 answer

Closure library dom node from html text

I have an html text like: '
1
2
' Is there a function in closure library to get such a string as input and return a DOM tree to insert in a document?
Just_Mad
  • 4,029
  • 3
  • 22
  • 30
5
votes
2 answers

What is the preferred way to define properties for Google Closure classes?

The example below shows a class that extends a goog.ui.Component. Should the properties of a class be defined outside of the constructor as shown below, or should they be defined inlined in the constructor only? Is it ok to initialize properties…
Odinodin
  • 2,147
  • 3
  • 25
  • 43
5
votes
1 answer

How can I use HTML5 Web Workers with Google Closure Tools?

I need to do some computationally intensive stuff in the background of my app and I've been learning about HTML5 Web Workers. Is there an integrated way to do this with Google Closure Tools? I found gears.Worker but it isn't clear to me whether this…
5
votes
3 answers

Why is `goog.base(this)` necessary in addition to `goog.inherits()`?

In this snippet of Google Closure javascript code involving a constructor, why is goog.base(this); necessary? Doesn't Foo already inherit from Disposable with goog.inherits(foo, goog.Disposable);? goog.provide('Foo'); /** * @constructor *…
1 2
3
24 25