-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add generic options object to App init #46
Conversation
@@ -251,7 +252,7 @@ class Application extends EventEmitter { | |||
|
|||
// Emit a ready event | |||
this.emit('xfc.ready'); | |||
this.JSONRPC.notification('authorized', [{ url: window.location.href }]); | |||
this.JSONRPC.notification('authorized', [{ url: window.location.href, options: this.options }]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we always send options or should we only send if it has something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it non-passive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is just extra info object always present/received, it could be read or ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no problem with always sending it then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is any work required to make this available on the Consumer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need any changes on Consumer as we are merging in the new options object with url into one detail object. https://github.com/cerner/xfc/blob/master/src/consumer/frame.js#L51
Please add documentation for this feature |
@@ -17,9 +17,10 @@ class Application extends EventEmitter { | |||
* This string must be a valid CSS selector string; if it's not, | |||
* a SyntaxError exception is thrown. | |||
*/ | |||
init({ acls = [], secret = null, onReady = null, targetSelectors = '' }) { | |||
init({ acls = [], secret = null, onReady = null, targetSelectors = '', options = {} }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add documentation for this new parameter.
@@ -1,5 +1,8 @@ | |||
Next Release | |||
------------- | |||
1.8.2 | |||
------ | |||
* Add generic options object to App init. #46 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be a 1.9 feature release. Also, we need README documentation on how to use this new feaature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update it.
Summary
Add generic options object to application initialization so that app can send this optional object to frame on authorization.