Workaround to get to JavaScript functions in Chrome in Bonfire?


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 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?

2 answers

1 accepted

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 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:

Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted Thursday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

189 views 12 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot