Questions tagged [google-closure]

Google Closure is a framework for writing large-scale applications in JavaScript. It includes an extensive library, a linter, a compiler, a template system, and a stylesheet language.

Google Closure is a framework for writing large-scale applications in JavaScript. It includes an extensive library, a linter, a compiler, a template system, and a stylesheet language.

Closure is an Object-Oriented framework which borrows many concepts from Java, such as support for strong typing for compile-time checking, and deep object inheritance hierarchies.

532 questions
0
votes
1 answer

Google Closure alternative to jQuery creating a dom element on the fly

Possible Duplicate: Closure library dom node from html text in jQuery you can create a dom element like this var domElement = $("

more tags and html

"); How do you do the same in Google Closure? I don't want to have to include…
Ally
  • 4,894
  • 8
  • 37
  • 45
0
votes
1 answer

Get an event when an event listener is added or removed on an object in the Google closure library

I am developing an API in which I want to be able to know when an event listener on an object is added or removed. The reason is that some of the events I am firing will require me to continually poll an object for updates, and I don't want to have…
0
votes
1 answer

Google Closure Tools PriorityQueue wrong order

I've created a unique priority queue with an enqueue method like this: huzz.ak.UniquePriorityQueue.prototype.enqueue = function(priority, value) { var node = {'valid': true, 'value': value, 'priority': priority}; var key = value.key; if…
0
votes
0 answers

using javascript to access position/font-color/font-size in a CSS class

Possible Duplicate: How to change/remove CSS classes definitions at runtime? lets say i have a CSS class in a file called storage.css .my-classname { position: absolute; top: 0px; left: 0px; background-color: #FFF; } how do i use…
bouncingHippo
  • 5,940
  • 21
  • 67
  • 107
0
votes
1 answer

Extending goog.Disposable generates jsDoc error

One of my classes generates a jsDoc error because it is extending goog.Disposable. I am using @extends to specify this, but it's still not working. Files compile without errors with the closure linter. the code can be found here"
flavian
  • 28,161
  • 11
  • 65
  • 105
0
votes
1 answer

Choosing a Compile-to-JS language with output size as a priority

I'm currently working with a large-ish Javascript codebase (currently around 150k minified) which is being included on a bunch of websites. As more features have been added, it's been growing in size, so I'm now investigating ways in which the size…
Jim
  • 713
  • 1
  • 6
  • 23
0
votes
1 answer

How can I reliably open a page in a new tab using Google Closure libraries?

I had tried to open a page in a new window with goog.window.open('/urlToOpen', { "location": false, "menubar": false, "statusbar": false }); However, Google Chrome's popup blocker prevented me from doing so when this code…
dangerChihuahua007
  • 20,299
  • 35
  • 117
  • 206
0
votes
1 answer

Change default equals in goog.structs.Map

I am using Google Closure Tools. I am trying to store objects in a Map and I need to change the way that they are compared so that the keys will be evaluated as equal or unequal appropriately. Does anybody have clues as to how this can be done?…
0
votes
2 answers

Google Closure's Graphic module is too much slow. goog.graphics.CanvasGraphics

Recently, I study HTML Canvas using Google Closure. but the performance of Google Closure is terribly slow. when I run my code.. it almost crash down Chrome browser. Of course I did the same thing in HTML Canvas code not using Google Closure; It…
Anderson
  • 3,139
  • 3
  • 33
  • 45
0
votes
1 answer

Calling a webservice using google closures jsonp and sending json as parameter

I want to call a webservice using google closures, via jsonp since i am performing a cross domain webservice. And i am calling it in the following manner var url = "http://myurl/"; var jsonp = new…
raghul
  • 1,008
  • 1
  • 15
  • 33
0
votes
1 answer

Translating VJET type annotations into Closure type annotations

EBay's VJET and Google's Closure Compiler both use type annotations in Javascript comments. Why have they chosen incompatible syntaxes? VJET function add(a, b) { //< Number add(Number, Number) return a + b ; } Google Closure /** * Queries a…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
0
votes
1 answer

Google Closure: working equation editor demo?

Context I am aware of http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/editor/equationeditor.html# However, when I try it, it does not work for me. Question: Is there a working demo of the Google Closure equation editor? I know it…
user1383359
  • 2,673
  • 2
  • 25
  • 32
0
votes
1 answer

Can points be compared in Google Closure?

Google Closure provides a way of finding the "deepest possible point." If I am trying to figure out if, for example, the cursor is at the end of a node, should I create the deepest possible point from the editor range and compare them for…
ehfeng
  • 3,807
  • 4
  • 33
  • 42
0
votes
1 answer

Annotating a class received from JSON server call

I am trying to properly annotate all my Javascript code and am still a beginner in this field. I get objects from a server call that are directly in json. Those objects are passed to functions and I call members directly. It obviously is very error…
Mad Echet
  • 3,723
  • 7
  • 28
  • 44
-1
votes
3 answers

Closure compiler treats definitions inside closures as redefinitions

I've been working with google closure, trying to get a large body of JavaScript to compile cleanly for minimization using the Google compiler. I came across a problem though: goog.provide('test'); goog.provide('test2'); /** * @constructor */ test…
hughdbrown
  • 47,733
  • 20
  • 85
  • 108
1 2 3
35
36