{"id":13657147,"url":"https://github.com/WebReflection/qso","last_synced_at":"2025-04-24T01:31:24.519Z","repository":{"id":65478815,"uuid":"158449592","full_name":"WebReflection/qso","owner":"WebReflection","description":"A MutationObserver like API for CSS selectors.","archived":true,"fork":false,"pushed_at":"2020-08-05T08:42:17.000Z","size":13,"stargazers_count":31,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-02T05:06:46.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://webreflection.github.io/qso/test/","language":"JavaScript","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/WebReflection.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":"2018-11-20T20:50:47.000Z","updated_at":"2023-01-28T13:13:47.000Z","dependencies_parsed_at":"2023-01-25T08:05:17.784Z","dependency_job_id":null,"html_url":"https://github.com/WebReflection/qso","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fqso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fqso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fqso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fqso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebReflection","download_url":"https://codeload.github.com/WebReflection/qso/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223940851,"owners_count":17228911,"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":[],"created_at":"2024-08-02T05:00:37.624Z","updated_at":"2024-11-10T10:30:47.836Z","avatar_url":"https://github.com/WebReflection.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Deprecated: QuerySelectorObserver\n\nPlease use **[qsa-observer](https://github.com/WebReflection/qsa-observer#readme)** instead, as it's been used in various other libraries, hence it's way more battle-tested, and better, than this initial attempt.\n\n- - -\n\n100% inspired by a [Daniel](https://twitter.com/csuwildcat)'s [hack](http://www.backalleycoder.com/2012/08/06/css-selector-listeners/), this module brings a friendly [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) like API to observe CSS selectors instead.\n\n```js\n\nconst so = new QuerySelectorObserver(records =\u003e {\n  for (const record of records) {\n    if (record.addedNodes.length) {\n      record.target.textContent = 'Hello via QSO!';\n      console.log(record.addedNodes);\n    } else {\n      console.log(record.removedNodes);\n    }\n  }\n});\n\nso.observe('.some-selector');\nso.observe('#some-complex \u003e .selector + p.cool');\n\nbutton.onclick = () =\u003e so.disconnect();\n```\n\nCompatible with IE11 and other browsers, feel free to [test it live](https://webreflection.github.io/qso/test/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWebReflection%2Fqso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWebReflection%2Fqso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWebReflection%2Fqso/lists"}