Skip to content
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

Dependency on browser/dart.js is obsolete #23005

Closed
DartBot opened this issue Mar 26, 2015 · 5 comments
Closed

Dependency on browser/dart.js is obsolete #23005

DartBot opened this issue Mar 26, 2015 · 5 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Mar 26, 2015

This issue was originally filed by @marcojakob


Now that we know the Dart VM will not get into the browser, isn't the dependency on packages/browser/dart.js obsolete?

Since there will not be any browsers capable of dealing with a .dart file, couldn't we replace the following:

<script type="application/dart" src="main.dart"></script>
<script data-pub-inline src="packages/browser/dart.js"></script>

with just

<script src="main.dart.js"></script>

Yes, I know there is still Dartium. But it would make much more sense to let Dartium rewrite the main.dart.js into main.dart for development instead of letting every browser do the opposite in production.

Or ist this something the dart2js should be responsible for? While translating main.dart to main.dart.js, the dart2js compiler could also replace the script tag in the HTML file.


What version of the product are you using?
Dart v1.9.1

@kevmoo
Copy link
Member

kevmoo commented Mar 27, 2015

cc @dgrove.
Removed Type-Defect label.
Added Type-Enhancement, Area-Dart2JS, Triaged labels.

@floitschG
Copy link
Contributor

Dart2js should not need to deal with HTML files.
It might make sense to let Dartium fetch the dart file instead. Maybe using custom attributes in the script-tag?


Removed Area-Dart2JS label.
Added Area-Dartium label.

@DartBot
Copy link
Author

DartBot commented Apr 3, 2015

This comment was originally written by di...@gmail.com


With Dart 1.9.1 if you replace <script type="application/dart" src="main.dart"></script> with direct include <script src="main.dart.js"></script> js-interop stops working. context variable is empty.

@DartBot
Copy link
Author

DartBot commented Apr 3, 2015

This comment was originally written by @zoechi


I tried it with a simple example and dart-js-interop still worked.

@DartBot
Copy link
Author

DartBot commented Apr 6, 2015

This comment was originally written by di...@gmail.com


Agree, my mistake.

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
@matanlurey matanlurey removed the closed-obsolete Closed as the reported issue is no longer relevant label Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants