{"id":16164547,"url":"https://github.com/reyk/web-sys-query","last_synced_at":"2025-03-18T23:30:28.208Z","repository":{"id":57672059,"uuid":"319267099","full_name":"reyk/web-sys-query","owner":"reyk","description":"jQuery-like API for web-sys","archived":false,"fork":false,"pushed_at":"2021-09-11T12:31:36.000Z","size":74,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-17T00:34:16.598Z","etag":null,"topics":["jquery","rust","wasm","web-sys"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-07T09:24:44.000Z","updated_at":"2024-12-27T16:15:26.000Z","dependencies_parsed_at":"2022-08-30T19:21:30.710Z","dependency_job_id":null,"html_url":"https://github.com/reyk/web-sys-query","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reyk%2Fweb-sys-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reyk%2Fweb-sys-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reyk%2Fweb-sys-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reyk%2Fweb-sys-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reyk","download_url":"https://codeload.github.com/reyk/web-sys-query/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244325042,"owners_count":20435028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jquery","rust","wasm","web-sys"],"created_at":"2024-10-10T02:47:01.846Z","updated_at":"2025-03-18T23:30:27.861Z","avatar_url":"https://github.com/reyk.png","language":"Rust","readme":"# jQuery-like API for web-sys\n\n[![docs.rs](https://docs.rs/web-sys-query/badge.svg)](https://docs.rs/web-sys-query)\n[![Build Status](https://travis-ci.org/reyk/web-sys-query.svg?branch=main)](https://travis-ci.org/reyk/web-sys-query)\n[![License](https://img.shields.io/badge/license-ISC-blue.svg)](https://raw.githubusercontent.com/reyk/web-sys-query/main/LICENSE)\n\n_jQuery is dead_ and everyone agrees that you should use a modern\napproach like React instead (or, in the Rust/WASM world,\n[Yew](https://crates.io/crates/yew)).\n\n`web-sys-query` allows you to port simple jQuery applications to\nRust/WASM with a familiar API instead of the rather complex\n[web-sys](https://crates.io/crates/web-sys) DOM API.\n\n## TODO\n\n- Documentation and examples\n- Unit tests\n- AJAX\n- ...\n\n## Feature flags\n\n- `serde-serialize`: use `serde_derive` to enable `Serialize` and\n  `Deserialize` support on types such as `FormData` (disabled by\n  default).\n\n## API\n\n### Attributes\n\n| jQuery: Attributes   | `Document`      | `Element` +  `Collection`      |\n| -------------------- | --------------- | ------------------------------ |\n| .addClass()          |                 | add_class                      |\n| .attr()              |                 | attr, set_attr                 |\n| .hasClass()          |                 | has_class                      |\n| .html()              |                 | html, set_html                 |\n| .prop()              |                 |                                |\n| .removeAttr()        |                 | remove_attr                    |\n| .removeClass()       |                 | remove_class                   |\n| .removeProp()        |                 |                                |\n| .toggleClass()       |                 | toggle_class                   |\n| .val()               |                 | val, set_val, *_i32, *_f64     |\n\n### Events\n\n| jQuery: Attributes   | `Document`      | `Element` +  `Collection`      |\n| -------------------- | --------------- | ------------------------------ |\n| ~.bind()~            |                 |                                |\n| .blur()              |                 | blur, set_blur                 |\n| .change()            |                 | change, set_change             |\n| .click()             |                 | click, set_click               |\n| .contextmenu()       |                 | context_menu, set_context_menu |\n| .dblclick()          |                 | dbl_click, set_dbl_click       |\n| ~.delegate()~        |                 |                                |\n| ~.die()~             |                 |                                |\n| ~.error()~           |                 |                                |\n| .focus()             |                 | focus, set_focus               |\n| .focusin()           |                 |                                |\n| .focusout()          |                 |                                |\n| .hover()             |                 |                                |\n| .keydown()           |                 | key_down, set_key_down         |\n| .keypress()          |                 | key_press, set_key_press       |\n| .keyup()             |                 | key_up, set_key_up             |\n| ~.live()~            |                 |                                |\n| .load()              |                 |                                |\n| .mousedown()         |                 | mouse_down, set_mouse_down     |\n| .mouseenter()        |                 | mouse_enter, set_mouse_enter   |\n| .mouseleave()        |                 | mouse_leave, set_mouse_leave   |\n| .mousemove()         |                 | mouse_move, set_mouse_move     |\n| .mouseout()          |                 | mouse_out, set_mouse_out       |\n| .mouseover()         |                 | mouse_over, set_mouse_over     |\n| .mouseup()           |                 | mouse_up, set_mouse_up         |\n| .off()               |                 | set_off                        |\n| .on()                |                 | on, set_on                     |\n| .one()               |                 |                                |\n| .ready()             |                 |                                |\n| .resize()            |                 | resize, set_resize             |\n| .scroll()            |                 | scroll, set_scroll             |\n| .select()            |                 | select, set_select             |\n| .submit()            |                 | submit, set_submit             |\n| ~.toggle()~          |                 |                                |\n| .trigger()           |                 |                                |\n| .triggerHandler()    |                 |                                |\n| ~.unbind()~          |                 |                                |\n| ~.undelegate()~      |                 |                                |\n| ~.unload()~          |                 |                                |\n\n### Manipulation\n\n| jQuery: Traversing   | `Document`      | `Element` + `Collection`       |\n| -------------------- | --------------- | ------------------------------ |\n| .after()             |                 |                                |\n| .append()            |                 |                                |\n| .appendTo()          |                 |                                |\n| .before()            |                 |                                |\n| .clone()             |                 |                                |\n| .css()               |                 |                                |\n| .detach()            |                 |                                |\n| .empty()             |                 |                                |\n| .height()            |                 |                                |\n| .innerHeight()       |                 |                                |\n| .innerWidth()        |                 |                                |\n| .insertAfter()       |                 |                                |\n| .insertBefore()      |                 |                                |\n| $.cssNumber          |                 |                                |\n| $.htmlPrefilter()    |                 |                                |\n| .offset()            |                 |                                |\n| .outerHeight()       |                 |                                |\n| .outerWidth()        |                 |                                |\n| .position()          |                 |                                |\n| .prepend()           |                 |                                |\n| .prependTo()         |                 |                                |\n| .remove()            |                 |                                |\n| .replaceAll()        |                 |                                |\n| .replaceWith()       |                 |                                |\n| .scrollLeft()        |                 |                                |\n| .scrollTop()         |                 |                                |\n| .text()              |                 | text, set_text                 |\n| .unwrap()            |                 |                                |\n| .width()             |                 |                                |\n| .wrap()              |                 |                                |\n| .wrapAll()           |                 |                                |\n| .wrapInner()         |                 |                                |\n\n### Traversing\n\n| jQuery: Traversing   | `Document`      | `Element` + `Collection`       |\n| -------------------- | --------------- | ------------------------------ |\n| .add()               |                 |                                |\n| .addBack()           |                 |                                |\n| ~.andSelf()~         |                 |                                |\n| .children()          | children        | children                       |\n| .closest()           |                 | closest                        |\n| .contents()          |                 |                                |\n| .each()              |                 |                                |\n| .end()               |                 |                                |\n| .eq()                |                 |                                |\n| .even()              |                 |                                |\n| .filter()            |                 | filter                         |\n| .find()              | find            | find                           |\n| .first()             |                 | first                          |\n| .has()               |                 | has                            |\n| .is()                |                 | is                             |\n| .last()              |                 | last                           |\n| .map()               |                 |                                |\n| .next()              |                 | next                           |\n| .nextAll()           |                 |                                |\n| .nextUntil()         |                 |                                |\n| .not()               |                 | not                            |\n| .odd()               |                 |                                |\n| .offsetParent()      |                 |                                |\n| .parent()            |                 | parent                         |\n| .parents()           |                 |                                |\n| .parentsUntil()      |                 |                                |\n| .prev()              |                 | prev                           |\n| .prevAll()           |                 |                                |\n| .prevUntil()         |                 |                                |\n| .siblings()          |                 |                                |\n| .slice()             |                 |                                |\n\n### Helper Functions\n\n| jQuery: Traversing   | `Document`      | `Element` + `Collection`       |\n| -------------------- | --------------- | ------------------------------ |\n| jQuery.param()       |                 |                                |\n| .serialize()         |                 |                                |\n| .serializeArray()    |                 | serialize_array, `FormData`    |\n\n## Copyright and license\n\nLicensed under an OpenBSD-ISC-style license, see [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freyk%2Fweb-sys-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freyk%2Fweb-sys-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freyk%2Fweb-sys-query/lists"}