Hello,
I created some JS functions in my app: e.g. 'document.getMyAppsBuildNumber()' returns the build number which we can populate via Bonfire's variables into a JIRA issue field.
That's the idea at least! But it's not working in Chrome. I do get a result from that call using IE9+Bonfire.
{quote} Chrome and Safari effectively run extension scripts in a sandbox, allowing access to the DOM but not global variables and functions{quote}
which is what I am experiencing in Bonfire + Chrome.
If I check http://code.google.com/chrome/extensions/content_scripts.html it seems there could be a workaround possible: have some shared place to set the answer in the application to the question asked by Bonfire. So a bit of indirect passing of variables.
But I guess that means that there is some development needed in the Bonfire for Chrome extension, as well as some extra coding in our application.
Or is there a workaround for such custom JS variables and functions?
At the moment there is no workaround other than the DOM access methods suggested by Google.
It does raise an interesting question of having a standardised access wrapper in Bonfire, so that you would only need to create hidden HTML elements in the right format, then access their contents in a variable with something like bonfire.meta[name].
I've raised a feature request at https://jira.atlassian.com/browse/BON-607 to address that issue.
Hey I think I might have something to fix your problem. You can perform synchronous AJAX requests with Bonfire and Chrome. So instead of a javascript method called getmyAppsBuildNumber(), you would have a web service/script sitting there waiting for requests.
You can read more about it on a blog post I made about this issue: http://mikemurko.com/general/ajax-variables-in-atlassian-bonfire-for-jira-to-access-session-state/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.