Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

SignalR in embedded web browser control #953

Closed
budcribar opened this issue Sep 27, 2017 · 5 comments
Closed

SignalR in embedded web browser control #953

budcribar opened this issue Sep 27, 2017 · 5 comments

Comments

@budcribar
Copy link

I have an embedded web-browser control and an embedded Kestrel server in a Windows application. The embedded control uses an older version of IE. IE throws a syntax error when it hits "class Base64EncodedHubProtocol" when it loads Base64EncodedHubProtocol.js What do I need to do to fix this?
change Base64EncodedHubProtocol.js to Base64EncodedHubProtocol.ts and re-compile targeting ES5?

@moozzyk
Copy link
Contributor

moozzyk commented Sep 27, 2017

Yes, IE does not support ES6 so you need to compile to ES5 (or use the ES5 version included in the dist/browser folder).

@budcribar
Copy link
Author

I am also using Angular 4, so I tried setting the .angular-cli.json to:
"scripts": [
"../node_modules/@aspnet/signalr-client/dist/browser/signalr-clientES5-1.0.0-alpha1-final.js",
"js/odometer.min.js",
"js/scroller.min.js"
],

but somehow it gets mapped to loading Base64EncodedHubProtocol.js from the src directory which is not ES5. I have no idea how "ng build" does this but the downloaded file (vendor.js) using the embedded web browser control or Internet Explorer 11 is different than if I download it using Edge or Chrome. Any suggestions?

@moozzyk
Copy link
Contributor

moozzyk commented Sep 27, 2017

Take a look at:
#729
angular/angular-cli#7532
#867
and let me know if this helps.

@budcribar
Copy link
Author

I included the client sources in my project so they would compile down to ES5 and it seems to work. Haven't tried to do "ng build --prod" yet. Not a great solution for those trying to support old browsers...

@moozzyk
Copy link
Contributor

moozzyk commented Oct 2, 2017

As per #867 (comment) it might be fixed soon in the Angular-cli

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants