Question

I downloaded the Spark project (https://github.com/dart-lang/spark) and tried to run the widget examples.

After adding

<link rel="import" href="../packages/polymer/polymer.html">

to the entry page of the first example to make it work with Polymer 0.9.10-dev.x (I added ../ because the entry page is in a subdirectory in example) I get this error:

 Uncaught SyntaxError: Failed to construct 'URL': Invalid URL (http://127.0.0.1:3030/widgets/example/packages/web_components/platform.js:35)

When I copy this URL to Dartium the script is shown in the browser, so the URL is OK.

Any idea what could cause this error message?

Était-ce utile?

La solution

While trying to add all relevant information to the question I found the cause and a solution:

I changed

<!-- BUG: https://code.google.com/p/dart/issues/detail?id=14382 -->
<!-- link rel="stylesheet" href="xyz.css" -->
<style>
  @import url("../../../packages/spark_widgets/spark_modal/spark_modal.css");
</style>

to

<link rel="stylesheet" href="spark_modal.css">

and the error message went away and the examples are working fine now.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top