Before I begin, I know almost nothing about JavaScript. I'm just a lowly C++ developer being tasked to do something that should be easy.
In essence, I need to configure a QWebEngineView to show a webpage that is being developed for us by an outside UI vendor. Whenever I load the page in my QWebEngineView, I get a ton of errors in the JavaScript Console (http://imgur.com/vAapTZW). However, if I go to the page directly through Chrome, everything looks exactly like it should (http://imgur.com/M58umll).
I have checked that other webpages can load correctly within my view, but, for whatever reason, not the page that is being developed for us. I have also scoured the Qt documentation for references to any JavaScripts limitations and have also found none.
For reference, they are using Ember.js with JavaScript version ES6 and I am using the latest version 5.5.1 of the Qt framework, but have also tried 5.3.2. I have also tried using the now deprecated QtWebKit instead of QtWebEngine hoping it was simply a design oversight in the new widget.
Any help either solving this issue or coming up with a strategy to figure out how to debug this would be amazing!
Thanks!
Related
I often run into the problem of an javascript es6 import statement (transpilled via babel) failing to actually find the file the developer intended. This is particularly concerning during refactoring or during auto-fixing/formatting.
Is there a way to automatically flag imports, that are bringing in undefined? edit: at runtime?
It is standard practice to have a developer console of some kind or another (such as Chrome Developer Tools - hit F12, if working on web pages) open during refactoring or development of the Javascript.
So any imports that are not found would generate errors in that console, and thus be visible to the developer.
Missing imports however are not of concern (or should not be) to the User, and far as I know there is no mechanism to flag this to a User (non-developer) of the page. Dood design dictates it is not something they should be concerned with.
So you're probably thinking okay, during development time the we detect during our refactoring via the console that some imports have gone missing, we fix them and publish the latest code/page. Later the imports go missing.
Well that's the thing. If the imports live on external sources and can just randomly go missing, you need to fix That problem. If the imports need to live locally (same location as the javascript being served up) so they are available with 100% accuracy, then do that.
I'm using https://github.com/ride/ember-stripe-service add-on and everything worked nicely until Ember 1.10.1, but since Ember 1.11.0 Ember's run loop start crashing in E2E testing saying that we were trying to access a destroyed object, I have been trying to fix it but I couldn't so I made a PR https://github.com/ride/ember-stripe-service/pull/32 reproducing the error in tests/dummy and tests/integration but neither they know how to fix it, please help.
We think is something related with Stripe.js (https://js.stripe.com/v2/) because they embed an Iframe when the script in loaded in the browser.
I am referring to the following example for Node and React: https://github.com/yldio/react-example
I am able to add a book to the array when javascript is enabled in Chrome. When I disable javascript in Chrome, I am not able to add a book to the array.
Is there any way to resolve this?
Is there any way to resolve this?
Not in the way that you're hoping.
React is a JavaScript framework for the front-end. Which means it executes in the browser. If you disable JavaScript in the browser, React doesn't work anymore. Just in the same way if you delete Photoshop from your computer, you can't open .psd files anymore.
If you really must support browsers without JavaScript (which most people don't), you need to build your app to work with plain old HTML based navigation (think links, forms etc).
It's possible to use React (for people with JS enabled) and a fallback for those without, this approach is called Progressive Enhancement. Might be useful to you: https://softwareengineering.stackexchange.com/questions/25969/should-i-bother-to-develop-for-javascript-disabled
I am experimenting with developing a primitive web interface using Aptana Studio 3, and when I run the site from Aptana as an internal server in either IE or Firefox, the page renders as I expect. In contrast, when I open the same HTML page in a browser (i.e. not running it through Aptana), it displays incorrectly (e.g. modal dialog appears at the bottom of the page rather than as modal when I click a button).
I tried different "meta" compatibility commands at the top of the HTML code to see if I could duplicate how Aptana opens the site. I am not sure if JS and JQuery need to be run as a server or if this is an indication of a bug in my code. If it is a requirement to run JS, JQuery, and bootstrap in a server as Aptana does, any guidance on how to duplicate what Aptana is doing in a standalone offline fashion would be sincerely appreciated.
Note: This is a for a class assignment. The assignment is unrelated to JQuery and Javascript; rather it is on UI design patterns and software engineering. The reason I am using JS and JQuery is I thought this assignment would be a good opportunity to become more familiar with those tools.
For most standard browsers, many jQuery features do not render/appear correctly if they are not run inside a web server. When entering debug or run mode in Aptana, it is in the background starting a local web server. If you want a free web based server, I recommended using the "rawgit" feature bundled with Github; this is what I ended up using. For more information, see here:
https://rawgit.com/
I just realized that what is a nice and working layout of a form with a webresource in on-line version, looses some (but not all) of the formatting when accessed via Outlook. It looks ugly and, I also get errors.
It's somehow related to the JavaScript added to the solution. Or, rather, the web resources, I'd say. Any suggestions on how to debug? F12 doesn't show the console when run from Outlook. I haven't done much with that version so any hint might be of help.
Are you able to narrow down your problem to a part of the script? Could you for instance disable and enable parts of the script(s) to see what works and what does not?
Since the layout is also being influenced, I think you are doing some (or a lot of?) DOM manipulation. This page on MSDN states:
HTML DOM manipulation is not supported
But there should not be that much of a problem (heard that one before...) using Outlook: Dynamics CRM 2011 Outlook client and browser rendering
Edit:
Just to prevent people overlooking the link to a related post from the comments: Random JavaScript Errors in CRM 2011 Outlook Client
Although the page you see in the CRM-Outlook is indeed rendered by IE, it's being served from another version of the engine than what is used to browse. During the rendition process it's "picturized" (lacking a better word for it) so what you see originates in a webpage but isn't one.
I don't think there's a way to debug that version. You can only rely that the development you've tested will work as supposed to. Note that there's no connected process of IE run at the same time as the Outlook client.
I'll gladly stand corrected but as far I've tried (and I've tried a lot, a lot), there's no way to get there.