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
4
votes
1 answer

How to configure karma-runner (also known as testacular) to work with closure-library

I'm trying to use karma-runner with mocha testing framework to test an application built with closure-library and angularjs. I always get namespace.Application is not defined thanks in advance. here's my config file basePath = ''; files = [ …
4
votes
1 answer

Google closure library: stopPropagation on components

I am trying to figure out why stopPropagation does not work when used with google closure components. It works fine for browserEvents but not for Events on components. Please see example code below that demonstrates on your browser the…
Lefteris
  • 59
  • 9
4
votes
2 answers

How do I iterate over enum values in Google Closure?

I'm trying to find the best way to iterate over all of the values on an enum defined in Google Closure. Let's say I have the following enum defined: /** * @enum {number} */ sample.namespace.Fruit = { Orange: 0, Apple: 1, Banana: 2 }; Right…
4
votes
1 answer

Google closure variable window/event/console/... is undeclared error

I'm trying to compile one of my HTML5 project using Google Closure. I'm recieving several errors that I don't know how to solve. In fact, it's the same error but for different variables. Here the errors messages: variable window is…
4
votes
2 answers

Creating a Table Using Closure Tools

Can anyone help me in creating a table(grid layout) using closure Libray? Is there any widget available for it? I searched but din't find any! Please Help
Siddharth Trikha
  • 2,648
  • 8
  • 57
  • 101
3
votes
1 answer

How does gmail use ajax?

Looking at firebug, gmail sends GET requests to get something like: while (true); &&&START&&&{"Success":true,"Body":{"Contacts":"[[,[,,\"83473f5sc6b17e0\",,[[,1,\"1\"]\n]\n[,,,[,,[,[,,,,,,,,,,,[[,1]\n ... } &&&END&&& What are these arrays? Are…
ali
  • 531
  • 5
  • 22
3
votes
2 answers

Preventing AJAX calls to be cached in Google Closure Library

I can't find the way to turn off browser (and sometimes server "304") cache in GCL AJAX calls, like I've done in jQuery. $.ajax({ url: "test.html", cache: false, }); Maybe I can control headers somehow? I do not appreciate answers like adding a…
Dan
  • 55,715
  • 40
  • 116
  • 154
3
votes
2 answers

What are the supported browsers and devices for Google's Closure Javascript library?

Where do you find out if Android, Safari (iOs) etc are supported by the Google Closure libraries?
David d C e Freitas
  • 7,481
  • 4
  • 58
  • 67
3
votes
1 answer

detect circular dependencies in python

I don't understand why the _ResolveDependencies method in DepsTree class can detect circular dependencies. Seems it can detect the situation if a requires b and e and b requires e, but it's not a circular dependencies. class DepsTree(object): …
bajie
  • 187
  • 2
  • 7
3
votes
1 answer

Google Closure suppress warning messages for a particular file

I am using google closure compiler to compress all the javascript into single file. While compliance it give lot of warning messages.In my case I have already compressed third party JS files, Which causes complete file to be printed on browser (i…
3
votes
2 answers

google closure library sanitizer.sanitize removes my id on dom elements

I am dynamically updating tabs with content using goog.dom.safeHtmlToNode since the newer release of the google closure library removed the dom fragment method: goog.dom.htmlToDocumentFragment(htmlString). The sanitizer removes my "id=xyz" from…
Lillian
  • 87
  • 2
  • 7
3
votes
2 answers

How to select dropdown item (select option) in google closure?

on jQuery i could just do $('#idOfSelectTag').val('someValue'); How to do the same in google closure?
meska
  • 41
  • 3
3
votes
1 answer

What is the difference between struct and dict?

These two terms are used a lot in this documentation. The notion of struct is easy to understand i.e object whose properties are fixed but then we have dict which can have any number of properties so, how its different from the normal Object? why…
3
votes
1 answer

Google Closure --process_jquery_primitives issue (with Jquery import)

I'm trying to make jQuery correctly compiled by Google closure with the rest of my script. Here the command line I am using with compiler : java -jar /my/path/to/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --generate_exports --js…
3
votes
1 answer

atom packages, clojurescript, google closure and dependency management

I'm writing some atom (the editor) package with ClojureScript. And i faced dependency load issue. When compiled ClojureScript produces file like this (main.js): goog.addDependency("base.js", ['goog'], []); goog.addDependency("../cljs/core.js",…