Skip to content

Commit 461d9b4

Browse files
Merge pull request #141 from braintree/readme-enhancements
update readme
2 parents 52be58b + 6cc16d3 commit 461d9b4

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ origin.
4343

4444
The `channel` namespaces the events called with `on` and `emit` so you
4545
can have multiple bus instances on the page and have them only
46-
communicate with busses with the same channel value.
46+
communicate with buses with the same channel value.
4747

4848
If a `verifyDomain` function is passed, then the `on` listener will only
4949
fire if the domain of the origin of the post message matches the
@@ -93,7 +93,7 @@ bus.addTargetFrame(myIframe);
9393
**returns**: a chainable instance of framebus that operates on the
9494
chosen origin.
9595

96-
This method is used in conjuction with `emit`, `on`, and `off` to
96+
This method is used in conjunction with `emit`, `on`, and `off` to
9797
restrict their results to the given origin. By default, an origin of
9898
`'*'` is used.
9999

@@ -124,7 +124,7 @@ otherwise
124124
#### `emitAsPromise('event', data?): Promise`
125125

126126
**returns**: A promise that resolves when the emitted event is responded
127-
to the first time. It will reject if the event could not be succesfully
127+
to the first time. It will reject if the event could not be successfully
128128
published.
129129

130130
| Argument | Type | Description |
@@ -180,9 +180,9 @@ framebus.include(popup);
180180
framebus.emit("hello popup and friends!");
181181
```
182182

183-
| Argument | Type | Description |
184-
| -------- | ------ | -------------------------------------------- |
185-
| `popup` | Window | The popup refrence returned by `window.open` |
183+
| Argument | Type | Description |
184+
| -------- | ------ | --------------------------------------------- |
185+
| `popup` | Window | The popup reference returned by `window.open` |
186186

187187
#### `addTargetFrame(frame): boolean`
188188

@@ -194,7 +194,7 @@ noop.
194194
var frame = document.getElementById("my-iframe");
195195

196196
framebus.addTargetFrame(frame);
197-
framebus.emit("hello targetted iframe!");
197+
framebus.emit("hello targeted iframe!");
198198
```
199199

200200
| Argument | Type | Description |
@@ -294,6 +294,12 @@ occur as follows:
294294
6. Back on `http://emitter.example.com`, the `callback` is called and
295295
unsubscribed from the special UUID event afterward.
296296

297+
### Upgrading past 5.x.x
298+
299+
If you are importing framebus via `import { Framebus } from 'framebus/dist/framebus'`, your functions may error out due to missing the `attach()` call done in `index.ts`. You may need to add an additional line, `import 'framebus/dist/index'` to ensure this call completes.
300+
301+
See [here](https://github.com/braintree/framebus/issues/115) for more details.
302+
297303
## Development and contributing
298304

299305
See [**CONTRIBUTING.md**](CONTRIBUTING.md)

0 commit comments

Comments
 (0)