technologiesloha.blogg.se

Web editor definition
Web editor definition













And there are frameworks like Mavo which adds only global attributes but not Yep. I don't know what setting to call if I combine both. Seems stencil is already generating metadata for compilers and you just added one more JSON output? Glad to see such thing baked into frameworks. cc Do you have a pointer to how you are using Thanks for the quick PR. The HTML Language Service doesn't recognize that a tag name maps to a class, so it looks like we'd have to just re-parse the HTML in a separate service.

#Web editor definition code#

Note: We've started looking at adding better analysis support to the lit-html VS Code extension, and the biggest immediate roadblock is the lack of integration between the HTML and TypeScript Language Services. Then on our end we can work on updating the Polymer Analyzer to output this format and support new jsdoc tags rather quickly, and to read the formats. Given that the typings, definitions, and jsdoc tags are interop points between tools, I think we should start with defining their formats. We would also be very interested in reading this information from package.json and using it to drive, rather than doing analysis on published npm packages. We would be very interested in contributing infrastructure to a non-Polymer-branded analyzer that VS Code and the rest of the ecosystem can easily use. It does analyze vanilla elements that extend from HTMLElement and/or are registered with plain fine(). The Analyzer is not very Polymer specific in most places, aside from some bundled plugins to recognize Polymer-specific declarations. The Polymer Analyzer generates a JSON file already that describes a lot of this information for elements, inferred from the prototype chain and jsdoc annotations. I hope that other IDEs and toolchains would be ok with using. d.ts files and HTMLElementTagNameMap, and JSON is probably ok for the rest, modulo some cross-file references like the types of Events. I think the easiest way to describe the DOM interface if via.

  • DOM interface: Properties, methods, superclass, implemented interfaces.
  • This is awesome to see :) I have a bunch of thoughts in this area, since we've been working on similar things for a few years.įirst, is that elements have a very right API surface, not just limited to attributes, and for the best experience we need to take all of them into account:
  • Would WebComponents implement an Analyzer, similar to Polymer Analyzer for generating such JSON files on-the-fly?.
  • Would the WebComponents committee be interested in specifying a format for such JSON files?.
  • What are some additional editor features that could be implemented for Web Components? For example, jump to definition on in HTML goes to the JS source where the component is defined?.
  • web editor definition

    But if you have other questions / concerns, feel welcome to chime in. I'd like to get some input for questions below. When the user navigates to a HTML file, he should get HTML completions for the WebComponent he just defined. It would be awesome if an Analyzer (non-existent yet) would figure out the fine calls, generate such JSON files and feed them to the HTML Language Server to enhance its functionalities.

  • Someone just wrote my-component.js locally in a project.
  • VS Code finds the JSON files to enhance its HTML support. He includes web-components.json in his NPM distribution (similar to packages include d.ts files for TypeScript) and puts webComponents: "./web-components.json in his package.json.
  • Through Language Server Protocol, HTML Language Server in VS Code can be used in other editors too.
  • The TypeScript community has adopted Type Definition Files, which drives the completions, hover messages and many other language features in VS Code and other editors through javascript-typescript-langserver.
  • web editor definition

  • VS Code gets HTML completion and hover for the custom tags / attributes.
  • User points to these JSON files with and configurations.
  • User includes web-components.json and web-component-attributes.json in a project.
  • I also work on Vue Language Server where I'm already shipping such support for Vue-based frameworks. I'd like to get some feedback from the WebComponents commitee / community on implementing WC editor support.

    web editor definition

    I'm working on expanding our HTML Language Server to better support WebComponents.













    Web editor definition