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

Add attribute to existing tag #77

Open
hasn-prevas opened this issue Dec 21, 2023 · 1 comment
Open

Add attribute to existing tag #77

hasn-prevas opened this issue Dec 21, 2023 · 1 comment
Assignees

Comments

@hasn-prevas
Copy link

Is it possible to add a new attribute to an existing HTML tag?

I have tried the following:

{
  "$schema": "https://json.schemastore.org/web-types",
  "name": "Foo attribute",
  "version": "0.0.1",
  "contributions": {
    "html": {
      "elements": [
        {
          "name": "Foo attribute on script tag",
          "extension": true,
          "pattern": {
            "or": ["script"]
          },
          "attributes": [
            {
              "name": "foo",
              "value": {
                "required": false
              }
            }
          ]
        }
      ]
    }
  }
}

foo attribute are now allowed on script tags, but existing attributes (e.g. defer, src etc.) are now marked as errors (in IntelliJ IDEA 2023.3.1 - Build #IU-233.11799.300):

image

@piotrtomiak
Copy link
Collaborator

@hasn-prevas This is correct Web Types definition. It looks like there is a bug on our side. I've filed an issue, please follow: https://youtrack.jetbrains.com/issue/WEB-65042

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants