Skip to content

client_x() should return f64 #2079

@sebastianv89

Description

@sebastianv89

Describe the Bug

MouseEvent.client_x() returns an i32, which should be a f64. The same problem occurs on a few places:

  • MouseEvent.client_x()
  • MouseEvent.client_y()
  • MouseEvent.offset_x()
  • MouseEvent.offset_y()
  • MouseEvent.page_x()
  • MouseEvent.page_y()
  • MouseEvent.screen_x()
  • MouseEvent.screen_y()

Additional Context

See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX for additional documentation and https://drafts.csswg.org/cssom-view-1/#idl-index for the current specs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeTracking breaking changes for the next major version bump (if ever)web-sysIssues related to the `web-sys` crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions