How to handle document.registerElement deprecation in Polymer v1? - polymer

In the browser console, I see:
[Deprecation] document.registerElement is deprecated and will be
removed in M73, around March 2019. Please use
window.customElements.define instead. See
https://www.chromestatus.com/features/4642138092470272 for more
details.
It's coming from polymer-micro.html:443, which is coming from my Polymer 1.11.3 package in my project. I believe that's the latest v1 version.
How do I handle this without updating Polymer to v2? I tried updating to Polymer 2, but it's failing at runtime. I guess the api changed.

For polymer v1 based components to work with the latest versions of modern browsers you should add the Web Components v0 polyfills in a way similar to this in your main html
<script src="/bower_components/webcomponentsjs/webcomponents-lite-min.js"></script>
For more info on this check the polymer team's blog post

Related

Swagger UI Not Loading Sometimes

I'm using latest version of Swagger in my ASPNetCore 3.1 project and debugging on latest version of Chrome. When I try to enter swagger page it sometimes not loading and i see an empty page. It looks like totally random. It solves after I refresh the page.
I saw these errors on console.
GET https://localhost:44389/swagger/swagger-ui-bundle.js net::ERR_HTTP2_PROTOCOL_ERROR
index.html:95 Uncaught ReferenceError: SwaggerUIBundle is not defined
at window.onload (index.html:95)
File in the error is random. Its sometimes a js file, sometimes a .css file. It changes.
If I publish this project on IIS and disable Http/2 support I never encounter this error.
Why?
You can try the following:
1.Check if all your controller methods have [http] tag. If they all do and still doesn't work go to step 2
2.In your configure function to ensure that you have app.UseStaticFiles(); If it still doesn't work go to step 3
3.Uninstall and reinstall swagger. If it doesn't work go to step 4 (Core Only)
4.If you are using Core Install Microsoft.AspNetCore.StaticFiles and reference it in your project.
I encountered the same problem, SwaggerUIBundle is not defined, and the problem is not on the web app that I'm developing but on my network. The problem was resolved after I switch to another network.

Is allennlp.service being deprecated?

I noticed that after I pulled version 1.0.0, I was no longer able to import allennlp.service. I see the docs are still updated only as far as 0.9.0 as well so I'm not sure what the status of the service module is.
Answer in comments above; the functionality was moved to http://github.com/allenai/allennlp-server as a plugin.

Aurelia minimal project for work inside Browser (no http server)

How to set a Aurelia minimal project for work inside Browser
(no http server) how to set a bare minimum aurelia system/boilerplate
to work just inside browser (no NodeJS)
mainly for understanding/learning purpouses
no NodeJS (using just Javascript from latest browsers, advise Firefox Developper)
no npm (just download latest version and copy minimum files)
no folders (all in root flat folder for clarification and learn purpouses)
just ES6/7 (no Typescript, no Babel, etc)
just CSS use (no SASS, no LESS, etc.)
You should read the Quick Start in the docs and download the Basic Project Setup
However, there's no way to use ES6/7 without Babel (or other js compiler) today.
Take a look at this github repo: aurelia/aurelia which has a simple starter kit with a concatenated script-tag ready build.

How to fix pointer event issue in Chrome 55+ without upgrade to newer version

We are using UI5 library version 1.36.12 in our Web app but due to chrome update some controls like IconTabBar, MulticomboBox are not working properly due to pointer events not disabled by default in the latest versions of Chrome.
One solution to this problem is to upgrade to version 1.38.14 but we are running in a tight schedule and we have to make many changes if we update the library.
One solution I tried is adding the fix in sap.ui.core.js file in current library jar files. But it is still not working. Should I have to rebuild sap.ui.core.js file and if yes how should I do that?
Please don't suggest to manually deactivate functionality in chrome through chrome://flags/#enable-pointer-events as client is not approving for that. Please suggest me a way to solve this issue without upgrading the library.
In the current UI5 version you can load your own Device object beforehand and UI5 will use it. I assume that this works in your version as well.
UPDATE: My proposal to reset the value later cannot work as it is used in the bootstrap mechanism. Therefore I removed this. Then the last resort is to use the approach mentioned by codeworrior on GitHub:
Before you bootstrap UI5 add a script tag and do the following:
if (/chrome/i.test(navigator.userAgent)) {
delete window.PointerEvent;
}
In this case pointer support is set to false.

How can Chromium use XUL Runner SDK?

In the credits section of Chromium and Chrome (chrome://credits/) you can find XUL Runner SDK.
I've done some search in the chromium website and didn't find any sign of it nor for what is it used.
I was trying to decide between using something like chromiumembedded, Awesomium, WebKit, XUL Runner, libRocket, etc. so that finding is confusing.
So my question is: Why is XUL Runner SDK in chrome://credits/ ?
You should search the source code to check. The only actual use of the XULRunner SDK appears to be in mock_ie_event_sink_test.h where an accessibility-related file is being included. Constants from that file (like IA2_EVENT_DOCUMENT_LOAD_COMPLETE) are then being used in mock_ie_event_sink_test.cc - a unit test file. So the dependency on XULRunner doesn't seem to apply to any code actually shipping with Google Chrome.