You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before Dartium is embedded into ever modern browsers, we will need to compile Dart into JS so that it can be run in those browsers and share the thrill that a Dart app can provide.
I did some small tests:
Create a dart to get "Quote Of The Day" from my local database. Works find in Dart. Compiled to JS. Works fine in Chrome.
Repeat 1 and created a "weather information". All is good.
Now I have:
two darts: qotd.dart, weather.dart
two compiled JS something like: qotd.dart.js, weather.dart.js
two html files
other supportive files
resides in their respective directories.
Now imagine I want to show those two darts in my index.html file:
linked the js (qotd.js, weather.js);
inserted the <polymer-element> declaration extracted from the html files
The outcome? Does not work, or more precisely, only one element can work. Which one is working depends on the sequence of the JS loading.
I know the problem lies in the JS files. Probably due to the function names, var names got overridden, or not loaded.
Of course, there are "get around" of this: I can create another Dart app encapsulating the above two.
Disadvantages of doing that:
The new Dart will be very much fixed. If I need a new feature set (say adding a stock qutoe), I need to rewrite the new Dart (besides creating a Stock Quote dart).
Not everyone possesses the Dart programming knowledge.
Imagine if we can do what I intended to in my example:
Dart developers can develop thousands of Darts, thus created a repo. The end users can just grab the JS/Dart/HTML and insert them into their WEB/HTML page and create a highly customizable, rich HTML pages.
Your thoughts on this?
The text was updated successfully, but these errors were encountered:
This issue was originally filed by taylor....@gmail.com
Sorry that I Can't find the right template for this. This is more a feature request.
===
URL: http://stackoverflow.com/questions/20702858/can-i-have-have-2-polymer-elements-in-one-html
I have illustrated a bit in the above URI.
Before Dartium is embedded into ever modern browsers, we will need to compile Dart into JS so that it can be run in those browsers and share the thrill that a Dart app can provide.
I did some small tests:
Now I have:
resides in their respective directories.
Now imagine I want to show those two darts in my index.html file:
The outcome? Does not work, or more precisely, only one element can work. Which one is working depends on the sequence of the JS loading.
I know the problem lies in the JS files. Probably due to the function names, var names got overridden, or not loaded.
Of course, there are "get around" of this: I can create another Dart app encapsulating the above two.
Disadvantages of doing that:
Imagine if we can do what I intended to in my example:
Dart developers can develop thousands of Darts, thus created a repo. The end users can just grab the JS/Dart/HTML and insert them into their WEB/HTML page and create a highly customizable, rich HTML pages.
Your thoughts on this?
The text was updated successfully, but these errors were encountered: