Will Polymer support Google Closure Compiler? What are the reasons why Polymer did not support Google Closure Compiler from the very beginning?
Well I can't answer why there wasn't support for the compiler from the beginning because I don't work on Polymer itself, but I do know that there are people working to make Polymer work better with the compiler now. In the short term, we're looking to add externs like these:
https://github.com/Polymer/paper-checkbox/tree/master/externs
for existing elements and are looking into adding an externs generator so that we don't have to manage these manually. Longer term, we are hoping to have full support for compiling Polymer elements and ensuring that they work well with other compiled code. Would externs address your use case in the short term? Maybe we can try to prioritize certain elements or at least give you some idea of when they'll be done.
A polymer-aware compiler pass looks like it's in the works: https://github.com/google/closure-compiler/wiki/Polymer-Pass
Related
I'm writing a game in C++ using the SDL framework, and want to create my game's GUI using HTML/CSS. I've looked into frameworks such as Awesomium, however I'm turned off by the fact that it's not open source. I want to create my own implementation of a similar idea.
However, I can find almost no documentation on actually using WebKit in this manner. The closest I can find is this Apple Developer guide to using WebKit but it's targeted at MacOS-specific applications written in Objective-C. It makes mention of a "Webkit C Reference" toward the bottom of the page, but I cannot find this actual document anywhere. Additionally, I've read the resources on the WebKit Wiki as well as prior StackOverflow questions on the same topic, but I haven't been able to find anything in the way of direct, clear documentation on embedding WebKit in a C++ program.
Does this documentation exist somewhere? What is the best resource for documentation on embedding WebKit within a C++ application?
I'm not really sure about this, but when I read about "c++" and "html/css". QT comes to my mind. Maybe you want to check it out.
Is it possible to detect parse errors in an HTML submitted to a WebView, using -loadHTMLString:baseURL:?
Is there a method that can be called when parsing errors occur?
The only possible delegate callback might be this, but I don't think it will give you what you're looking for (it's almost certainly network errors). A quick perusal through the list of possible NSError codes (near the bottom), don't have anything that might relate to your error. It seems you're out of luck here.
If you need to deal with parsing, then you're going to be using a different HTML renderer, such as WebKit or Blink. There are a few frameworks for building native apps that use the WebKit or Blink renderer. One of the most active is called Node-Webkit. While I can't say for absolute certainty that it will expose the parsing that you're looking for, the odds are much higher.
Some others that are similar are appJS and CEF. I like Node-Webkit because it's very simple to set up while also being fairly mature and in rapid development. If it doesn't give you what you're looking for, one of those others might.
i noticed a very strange way of naming classes in G+ and gmail..
example: a-b-h-Jb a-b-Rf-dB a-Rf-dB d-s-r (see G+'s code for yourself!)
who the hell does that? impossible to keep track of what you did in future.. same for gmail.
it is a known way of doing css that i am unfamiliar with? is it OOCSS? if a googler is reading this, can you please explain? Or if you are not the one who wrote the code, then please share your thoughts or prove that i am a dumb ass and don't know about a fairly common css naming 'good practice' (can i even call it that?)
Google uses something called the Google Web Toolkit (or simply GWT) to compile Java "applications" into their Javascript/HTML/CSS counterparts. GWT was used for GMail and Google Wave and my assumption is that it was also used for G+.
The GWT "compiler" (CS purists would never call GWT a compiler but the term fits) programatically names Javascript functions, CSS classes, HTML form IDs, etc. so they are almost never something legible.
At a guess, they probably have everything written out nicely in full at some point, and then put it through some program to compress it (reduce the length of variables). This reduces readability but also reduces file size, improving load times in theory.
I have a site that I am using prototype and scriptaculous on. One one page of my site, I would like to use Digitarald's FancyUploader (I have not found anything else that is as elegant, and offers multiple file selection). Is it possible to use the two on the same page? If so, how would I do it?
There is no way to run a Mootools script with prototype.
While Mootools provide a dollar-safe mode, that mode only provided compatibility with frameworks that provides a $() function.
The reason why Mootools and prototype are incompatible is that they both extend native JavaScript natives with their own methods. Unfortunately, there is no way of overriding this behavior.
SWFUpload is an alternative solution which is compatible with pretty much all JavaScript frameworks. It is pretty much functionally equivalent to FancyUpload. You might want to consider it as an alternative solution. If not, you'll have to make a choice between Mootools and prototype.
I inherited a web site project that includes mootools.js (about 40k) in most of the scripts. However, I have not seen, intuitively, where it is being used and given the nature of this porject, ahem, I'm thinking it might not be being used at all!
I'm "under the gun" to ship this tonight (yup, it's a pre-Thanksgiving release). I have not used mootools.js so I'm not sure what to grep for or if there's a sure tell way to determine this. I don't want to have to JSLint it (or do I LOL). Any suggestions would be appreciated. Thanks.
Mootools grafts itself onto some of the native js stuff, so it might be hard to do just by code inspection unless you are very familiar with what MooTools gives you.
Remove it, run your automated tests.
Cause you have those, right?...
Remove it and see if anyone complains.
(You could try it on a test machine first, if you're not feeling brave.)
You can check your source code on some MooTools methods, for example, addEvent().
If it is used so here is the Mootols :)
Just check from the home page of http://mootools.net/
I also was interested on one site why they use jquery and mootools. So, I found addEvent() method. It is Mootols method.
You must have a dev version of the site. Just pull it out and go over pages see if stuff breaks. Mostly you will get unknown function type stuff, if there is any dependencies. Firebug is your friend.
1, Open firebug
2, Click the DOM tab
3, Check if the Mootools object exists (It will say the current version of mootools next to it).
Hope this helps
:)