| Newsgroups |
gmane.text.xml.svg.devel |
| Message-ID |
<[email protected]> |
It appears that because I use this function it is being removed from the web platform, but seriously...
I am not a programmer or Javascript pro. I am currently using this script;
<script type="text/javascript">
function load_container(temp) {
var req = new XMLHttpRequest();
req.open("GET", temp, false);
req.send(null);
var page = req.responseText;
document.getElementById("container").innerHTML = page;
</script>
My browser developer tools tell me this is determental to the user experience. Huh? Can anyone clarify the reason and perhaps tell me how to properly write the script to be compliant with whoever is upset?
SynchronousXMLHttpRequest https://xhr.spec.whatwg.org/#xmlhttprequest outside of workers is in the process of being removed from the web platform as it has detrimental effects to the end user's experience. (This is a long process that takes many years.) Developers must not pass false for the async argument when the JavaScript global environment https://html.spec.whatwg.org/multipage/infrastructure.html#javascript-global-environment is a document environment https://html.spec.whatwg.org/multipage/webappapis.html#document-environment. User agents are strongly encouraged to warn about such usage in developer tools and may experiment with throwing http://heycam.github.io/webidl/#dfn-throw an InvalidAccessError exception when it occurs.
Thanks in advance.
James
http://svgdesign.guru