GithubHelp home page GithubHelp logo

Comments (12)

michaelkrog avatar michaelkrog commented on August 25, 2024

I second that.

Message I get: "Failed to execute 'querySelector' on 'Element': '#packages/core_elements/src/core-scaffold/menu' is not a valid selector."

My markup:

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sample app</title>
    <script src="packages/web_components/platform.js"></script>
    <script src="packages/web_components/dart_support.js"></script>
    <!-- import the click-counter -->
    <link rel="import" href="clickcounter.html">
    <link rel="import" href="packages/core_elements/core_scaffold.html">
    <link rel="import" href="packages/core_elements/core_item.html">
    <link rel="import" href="packages/core_elements/core_menu.html">
    <script type="application/dart">export 'package:polymer/init.dart';</script>
    <script src="packages/browser/dart.js"></script>

    <link rel="stylesheet" href="orderly_app.css">
  </head>
  <body>
    <core-scaffold>

    <core-header-panel navigation flex mode="seamed">
      <core-toolbar style="background-color: #526E9C; color: #fff;">Application</core-toolbar>
      <core-menu theme="core-light-theme">
        <core-item icon="settings" label="item1"></core-item>
        <core-item icon="settings" label="item2"></core-item>
      </core-menu>
    </core-header-panel>
    <div tool>Title</div>

    <div>Content goes here...</div>

  </core-scaffold>
  </body>
</html>

If I remove the core-scaffold tag, then I get no exceptions.

from core-elements.

davenotik avatar davenotik commented on August 25, 2024

I'm having this issue with the pub build output only. Removing core-scaffold eliminated the many errors I was seeing in the console, starting with: Uncaught SyntaxError: Failed to execute 'querySelector' on 'Element': '#packages/core_elements/src/core-scaffold/menu' is not a valid selector. I'd love to know when I can use it again, as it's responsible for a good looking view.

from core-elements.

ajklein avatar ajklein commented on August 25, 2024

I am also seeing this bug. <core-scaffold> is unusable in this state.

from core-elements.

sigmundch avatar sigmundch commented on August 25, 2024

I believe this is because of https://code.google.com/p/dart/issues/detail?id=19770. We have a fix submitted, I hope to update a new version of the polymer package with the fix.

from core-elements.

davenotik avatar davenotik commented on August 25, 2024

Great. Might you kindly update us here when it's available to us in some form? Thank you!

from core-elements.

sigmundch avatar sigmundch commented on August 25, 2024

I published a new version, but labeled as a pre-release (it as a -dev suffix). This means that pub will only download it if no stable version matches your version constraint. You should be able to do:

dependencies:
  polymer: ">= 0.11.1-dev < 0.12.0"

to try it out.

This version includes other changes that should help improve interop on two-way bindings between polymer elements written in Dart and JS too.

Feel free to reopen this bug if you still see the issue with the -dev version of the packages.

from core-elements.

davenotik avatar davenotik commented on August 25, 2024

'pub build' fails: https://gist.github.com/DaveNotik/2561e00d2911edc0f4c7

from core-elements.

davenotik avatar davenotik commented on August 25, 2024

Apparently, pub build no longer likes "-" in the name (as per error below) so changed to wovenapp and compiled fine.

Expected ';', but got '-'.
library woven-app.web.index.generated_expressions;

FWIW, I still get this error, even if it seems to compile successfully:

Build error:
Transforms {HtmlDartReferencesGenerator on woven-app|web/index2.html, HtmlDartReferencesGenerator on woven-app|web/index.html} all emitted asset woven-app|web/index.dart.html_reference.

In other news, the styling for these core-elements in Safari and Firefox is whack. I'll open a separate task.

from core-elements.

sigmundch avatar sigmundch commented on August 25, 2024

I'm not familiar with HtmlDartReferencesGenerator is that from a package you are using?

The language doesn't accept '-' in library names. Was that library name in your code or did we generate it? We generate library names sometimes if we extract code from an .html file and we find that there wasn't a library name in the inlined code. In those cases, we seem to be missing some sanitazion in how the name is generated. You can follow in more detail here: https://code.google.com/p/dart/issues/detail?id=19012

from core-elements.

davenotik avatar davenotik commented on August 25, 2024

It was in my pubspec.yaml as the name of the app.

from core-elements.

davenotik avatar davenotik commented on August 25, 2024

Apparently, that's part of Angular:

https://github.com/angular/angular.dart/blob/a12289f53671d8ff154f989c20e5bad186f27798/lib/transformer.dart#L123

I guess that's a separate issue (I'm not even seeing any side effects at the moment), and this can be closed?

from core-elements.

sigmundch avatar sigmundch commented on August 25, 2024

good to know. thanks!

from core-elements.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.