-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jQuery integration #15
Comments
This comment was originally written by chan...@gmail.com a Query API is already there. Please see here: |
This comment was originally written by pedramp...@gmail.com I don't think any company in the world can build a JS library better than jQuery, javascript programmers around the world dedicated 5 years of their time on jQuery for being the most user friendly javascript library. |
Removed Type-Defect label. |
This comment was originally written by drfibonacci@google.com Added Triaged label. |
Yeah. Right now in Dart in dart this would take a loop: You could always make a top level $ and alert functions if you want: The DOM APIs are a work in progress though. We want to make them as good as jQuery out of the box. For example, supporting aggregate operations on the result of queryAll |
This comment was originally written by pedram...@gmail.com I'm really excited, if google could make this easier like jQuery. that would be great. are we going to have this supported built in all browsers?! |
This comment was originally written by one.mik...@gmail.com This is a poorly specified request. Mixing Dart & jQuery on the client side should be treated as a general method for mixing JavaScript & Dart. A jQuery like DOM api might be a nice addition to the Dart standard library. The requester has completely overlooked that Dart is more than a client side language, and importing jQuery would not be portable. I think that supporting legacy JavaScript is a must, but it is not something that should be casually done without serious consideration. For example: jQuery's functional design does not mesh well with an true OOP language. You could wrap some of the jQuery functionality in a Dart class, but passing Dart methods into jQuery event handlers could be pretty dangerous. For that to work, there would have to be a pretty clear specification for how Dart gets compiled to JavaScript. Otherwise foolish developers will start coding around the compiler implementation and not the specification. |
This comment was originally written by pedramphp...@gmail.com I really agree on this with you, jQuery functional design does not mesh well with an OOP language as you said. and yes importing jQuery is not portable. but considering jQuery's functionality implemented in Dart is a MUST. if Dart can simulate all the features that jQuery provides and considerating simplicity and short method names with the Classical OOP pattern. it will 100% eliminate any need of any JS library or even coding pure javascript. as we all know javascript is mostly used on DOM related web projects. one other piece I see remaining for dart is adding MVC module. so it can get used in large scale web applications. |
This comment was originally written by ady...@gmail.com FYI, |
It is not possible to incorporate jquery directly into Dart. However, we are attempting to make the DOM libraries for Dart radically better, which would render this issue moot. Please review http://www.dartlang.org/articles/improving-the-dom/ , and let us know what you think (and file issues for things that you believe we should be doing differently/better/etc). Added WontFix label. |
This comment was originally written by pedramphp...@gmail.com This sounds really good. |
This comment was originally written by pedram...@gmail.com if we can have DOM methods Chainable that would be great as well |
Please file these as new issues so that we can track them. thanks! |
This comment was originally written by svav...@gmail.com How do I make an API Call in Dart? Using Jquery, I can say $.ajax("http://www.apicall.com?q=blahblah",true). How do I do that in Dart? |
Use HttpRequest: HttpRequest.getString("http://www.apicall.com?q=blahblah").then((response) { See: http://api.dartlang.org/docs/releases/latest/dart_html/HttpRequest.html |
This issue was originally filed by briank...@dearing-group.com
I may be mis-understanding dart, but I would like to put in a request that Google's engineers/someone smarter than me add jQuery as a possible library.
For instance, how would I accomplish the following using dart?
<pre>
$("p").click({function(){ alert("You clicked a paragraph tag!"); });
</pre>
The text was updated successfully, but these errors were encountered: