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

Google Closure - goog.require could not find goog.ui.AutoComplete

After updating to revision 2156 of the Google Closure Library, goog.require() fails to find goog.ui.AutoComplete. svn update At revision 2156. Error Message goog.require could not find: goog.ui.AutoComplete.Remote base.js:333 Uncaught Error:…
Anderson
  • 3,139
  • 3
  • 33
  • 45
3
votes
1 answer

How do I tell the Closure javascript compiler to not obfuscate the names of methods of webkitAudioContext?

I use the webkitAudioContext constructor, which is native to webkit browsers, in my application written using Google Closure javascript. After I compiled my javascript using Plovr in ADVANCED mode, I found that the decodeAudioData method of my…
3
votes
1 answer

Auto rebuild closure soy templates

I faced a problem while using Google Closure Soy templates. When I change a template I need to run a script from command line to compile Soy template to JS file. Is there a service or something else to rebuild these templates automatically? Also,…
3
votes
1 answer

How do I use a single event node to assign events to multiple children DOM elements?

In my Google Closure code, I want to assign an event to every single span in a div. HTML:
foo bar bacon is delicious
Closure Javascript: var container =…
dangerChihuahua007
  • 20,299
  • 35
  • 117
  • 206
3
votes
1 answer

Why is it that "Member must not have @private JsDoc"?

I'm cleaning up my code with the gjslint tool from Google Closure Tools. It is reporting the following error: Line 15, E:0222: Member "this._dictionary" must not have @private JsDoc And this is the code: /** * Stacker class. * @constructor *…
3
votes
1 answer

How Google Closure EventTarget works?

I'm hitting an error in advanced compilation mode. Uncaught TypeError: Object # has no method 'attachEvent' After some source map magic I figured that this is thrown from goog.events.listen call, where first argument is my custom object,…
2
votes
1 answer

using provide in closure library

I'm very newbie in closure, I'm reading the tutorial at: https://developers.google.com/closure/library/docs/tutorial and it says that goog.provide('tutorial.notepad.Note'); is equivalent to tutorial = tutorial || {}; tutorial.notepad =…
Aladdin Mhemed
  • 3,817
  • 9
  • 41
  • 56
2
votes
2 answers

removing an appended element using javascript/closure?

I currently have a click event in place that when selected appends a search box to .header, this is done using google closure. My problem now is if I click a close button I want to remove this appended element. I know using jQuery requires only…
styler
  • 15,779
  • 23
  • 81
  • 135
2
votes
1 answer

Creating an instance of goog.ui.Button with an image file

I'm relatively new to the Google Closure library and my current obstacle is getting a button to render programmatically with an image (as opposed to text). I've tried adding a img tag as the content of the button: var image =…
Tim Clemons
  • 6,231
  • 4
  • 25
  • 23
2
votes
3 answers

Custom Caption for ButtonSet

How can I change the caption (text) of the buttons of any ButtonSet in Google Closure Library goog.ui.Dialog ?
ehsun7b
  • 4,796
  • 14
  • 59
  • 98
2
votes
1 answer

How do you use wro4j together with the Closure library and compiler?

I followed the instructions at here, though I substituted 1.3.8 for the version, and I'm able to compile my JS in a wildcard folder as I wanted, however, I'm not quite sure where to place the closure library files so the compiler will pick them up. …
2
votes
1 answer

Ajax Window (Popup) Using Google Closure Library

Is there any class (like goog.ui.dialog) that let me show a dialog which its content can be fetched by ajax from another file? Is goog.ui.Dialog an appropriate class for this goal? Shall I implement it by other fundamental classes such as…
ehsun7b
  • 4,796
  • 14
  • 59
  • 98
2
votes
3 answers

Prevent event propagation using Google Closure Library

Using Google Closure Library: How can I handle clicking of an element for example a div but prevent firing the event handler when the user clicks the child elements of that element. For example in the following code I want to fire the event handler…
ehsun7b
  • 4,796
  • 14
  • 59
  • 98
2
votes
1 answer

Opening a url into a split panel using google closure library

This solution must use the google closure javascript library and not any other javascript library. When a url loads I would like to dynamically open a split panel where one side contains the content of the url in an iframe and the other side…
Phil
  • 4,134
  • 4
  • 23
  • 40
2
votes
1 answer

How could I effectively convert google-closure javascript to modern ES6?

I have a code base that uses the google-closure style modules goog.provide and classes, etc. I want to modernize this code base but it's roughly 15k lines of code and I was hoping a tool could help me. These tools are broken, I tried many things to…