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

0 votes
Accepted answer

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 Sign up to answer
Community showcase
Posted Tuesday in United States

Administrators Cleanup

Good morning, After a long weekend cleaning up, I am still in the cleanup mode 😊. I am curious to know: When do you feel the urgency to cleanup your Atlassian Tools? How many times do y...

63 views 1 2
View post

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