{"id":15558254,"url":"https://github.com/gobengo/easyxdm-npm","last_synced_at":"2025-04-28T17:27:32.840Z","repository":{"id":23737070,"uuid":"27110700","full_name":"gobengo/easyXDM-npm","owner":"gobengo","description":"https://github.com/oyvindkinsey/easyXDM but built for npm and CommonJS","archived":false,"fork":false,"pushed_at":"2016-01-31T17:24:24.000Z","size":148,"stargazers_count":6,"open_issues_count":3,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T03:27:37.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gobengo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-25T05:28:22.000Z","updated_at":"2019-05-31T10:12:27.000Z","dependencies_parsed_at":"2022-08-22T03:50:36.349Z","dependency_job_id":null,"html_url":"https://github.com/gobengo/easyXDM-npm","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/gobengo%2FeasyXDM-npm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobengo%2FeasyXDM-npm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobengo%2FeasyXDM-npm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobengo%2FeasyXDM-npm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gobengo","download_url":"https://codeload.github.com/gobengo/easyXDM-npm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251354307,"owners_count":21576172,"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-10-02T15:28:40.482Z","updated_at":"2025-04-28T17:27:32.802Z","avatar_url":"https://github.com/gobengo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# easyxdm-npm\n\nThis project hosts a CommonJS-compatible version of [easyXDM](https://github.com/oyvindkinsey/easyXDM) that can easily be rebuilt with `make`.\n\nThe official repo includes a version of easyXDM that is not CommonJS-compatible and always defines `window.easyXDM`. The one built here should never define a global.\n\n## Example\n\n```javascript\nvar easyxdm = require('easyxdm');\nvar iframeRpc = new easyxdm.Rpc({\n  remote: apiHost + \"/easyxdm.html\"\n},\n{\n  remote: {\n    request: {}\n  }\n});\n```\n\n## Debugging\n\nEasyXDM comes with a 'debug' mode which console.logs (or a window.opened log in IE9) a lot of what's going on as it passes messages around. To use this mode, `var easyxdm = require('easyxdm/debug')`.\n\n## make\n\nThe default `make` target in the Makefile is `build`. Build does a few things:\n\n1. Parse the version from this package.json, assume that this is the version of easyXDM that should get built.\n    * You can override this by setting the `VERSION` environment variable before running make. e.g. `make VERSION='2.14.9'`.\n2. Clone the tag with that version string from [the canonical easyXDM repo](https://github.com/oyvindkinsey/easyXDM) into /easyXDM/\n3. Concatenate all the JavaScript files that make up easyXDM. (if these get stale, consult the main repo's [build.xml](https://github.com/oyvindkinsey/easyXDM/blob/master/build.xml#L46))\n4. Use `sed` to insert the version number.\n5. Output to lib/easyXDM.js\n    * The 'main' module of this package is 'lib/easyXDM.js', so node and browserify should look there.\n\n## Use it node\n\nRequiring this module will throw an Error if the following globals are not defined: `window`, `document`, `location`. Browserify does this for you. If, for some reason, you need to require this module in vanilla node, you can use [jsdom](http://npm.im/jsdom):\n\n```javascript\nvar document = require('jsdom').jsdom();\nvar window = document.parentWindow;\nvar location = window.location;\nvar easyxdm = require('easyxdm');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobengo%2Feasyxdm-npm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgobengo%2Feasyxdm-npm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobengo%2Feasyxdm-npm/lists"}