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 compat data for EventType #1899

Closed
wants to merge 8 commits into from
Closed
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions api/EventType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"api": {
"EventType": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/Events",
"support": {
"chrome": {
"version_added": null
},
"chrome_android": {
"version_added": null
},
"edge": {
"version_added": null
},
"edge_mobile": {
"version_added": null
},
"firefox": {
"version_added": null
},
"firefox_android": {
"version_added": null
},
"ie": {
"version_added": null
},
"opera": {
"version_added": null
},
"opera_android": {
"version_added": null
},
"safari": {
"version_added": null
},
"safari_ios": {
"version_added": null
},
"samsunginternet_android": {
"version_added": null
},
"webview_android": {
"version_added": null
}
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
},
"click": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/Events/click",
"support": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contents of click must be also contained inside a __compat block, that’s why the build is failing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

"chrome": {
"version_added": true
},
"chrome_android": {
"version_added": null
},
"edge": {
"version_added": null
},
"edge_mobile": {
"version_added": null
},
"firefox": {
"version_added": true
},
"firefox_android": {
"version_added": null
},
"ie": {
"version_added": true
},
"opera": {
"version_added": true
},
"opera_android": {
"version_added": null
},
"safari": {
"version_added": null
},
"safari_ios": {
"version_added": null
},
"samsunginternet_android": {
"version_added": null
},
"webview_android": {
"version_added": null
}
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

click should have a sub-feature called on_disabled_elements containing the following:

"on_disabled_elements": {
  "__compat": {
    "description": "On disabled form elements",
    "support": {
      "chrome": {
        "version_added": true,
        "partial_implementation": true,
        "notes": "Only works for <code>&lt;textarea&gt;</code> elements and some <code>&lt;input&gt;</code> element types."
      },
      "chrome_android": {
        "version_added": null
      },
      "edge": {
        "version_added": false
      },
      "edge_mobile": {
        "version_added": false
      },
      "firefox": {
        "version_added": false
      },
      "firefox_android": {
        "version_added": false
      },
      "ie": {
        "version_added": true,
        "partial_implementation": true,
        "notes": "Internet Explorer only triggers the <code>click</code> event on <code>&lt;input&gt;</code> elements of type <code>checkbox</code> or <code>radio</code> when the element is double-clicked."
      },
      "opera": {
        "version_added": true,
        "partial_implementation": true,
        "notes": "Only works for <code>&lt;textarea&gt;</code> elements and some <code>&lt;input&gt;</code> element types."
      },
      "opera_android": {
        "version_added": null
      },
      "safari": {
        "version_added": null
      },
      "safari_ios": {
        "version_added": null
      },
      "samsunginternet_android": {
        "version_added": null
      },
      "webview_android": {
        "version_added": null
      }
    },
    "status": {
      "experimental": false,
      "standard_track": true,
      "deprecated": false
    }
  }
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why will I add this to the click event, is not sub-feature of click?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It must be on the same level as the __compat block, but not inside the __compat block.

Also, stuff like this has been made into sub-features in the past:

},
"available_on_workers": {
"__compat": {
"description": "Available on Workers",
"support": {
},
"secure_context_required": {
"__compat": {
"description": "Secure context required (HTTPS)",
"support": {

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I understand but why add it? This is not an event.

Copy link
Contributor

@ExE-Boss ExE-Boss Apr 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it’s part of the current documentation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thank you I had not understood the why of how. Thank you. I will add it.

}
}
}
}