Skip to content
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

[feat] browser support #27

Closed
3 tasks
niftylettuce opened this issue Aug 18, 2020 · 3 comments
Closed
3 tasks

[feat] browser support #27

niftylettuce opened this issue Aug 18, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@niftylettuce
Copy link
Contributor

niftylettuce commented Aug 18, 2020

Right now browser support is unstable due to these issues:

I previously had modified index.html with a basic example such as this:

  <script src="https://unpkg.com/bree">
  <script>
    (function() {
      function hello() {
        console.log('hello');
        postMessage('done');
      }

      var bree = new Bree({
        jobs: [
          {
            name: 'hello',
            path: hello,
            interval: '5s',
          }
        ]
      });

      bree.start();
    })();
  </script>

However since postMessage is not working, I have it commented out right now.

Note that I do expose threads from bthreads as Bree.threads, therefore one could write a browser test (e.g. with puppeteer that uses Bree.threads.backend === 'web_worker' and Bree.threads.browser === true to test that the proper backends load.

@shadowgate15 shadowgate15 added the enhancement New feature or request label Mar 20, 2021
@hyusetiawan
Copy link

can this be worked around if it's running on electron?

@shadowgate15
Copy link
Member

I'm closing this issue since bree no longer supports the browser.

@c0bra
Copy link

c0bra commented Jan 12, 2022

I'm closing this issue since bree no longer supports the browser.

If that's the case, can you remove "Works in the browser" from index.html?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants