https://bugzilla.wikimedia.org/show_bug.cgi?id=71474

            Bug ID: 71474
           Summary: Flow uses synchronous XMLHttpRequests
           Product: MediaWiki extensions
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Flow
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]
       Web browser: ---
   Mobile Platform: ---

Flow uses a synchronous XMLHttpRequest.  These should be avoided since it
blocks waiting for a network response, and can create a bad UX.

For this reason, it's been actively deprecated in recent Firefox (30+), when
used on the main thread
(https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest), and will log
a warning.

It is used in mw.flow.parsoid.convert.  This in turn is called twice, both from
ext.flow.editor.js:

1. mw.flow.editor.load -
https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FFlow/a4eda372ccbd733ff741d3e1369c25a1e561fcf0/modules%2Feditor%2Fext.flow.editor.js#L88
-  This is using promises already, so it should be straightforward to use an
async call here.

2. mw.flow.editor.getContent -
https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FFlow/a4eda372ccbd733ff741d3e1369c25a1e561fcf0/modules%2Feditor%2Fext.flow.editor.js#L88
- This is synchronous, and used by
FlowBoardComponent.UI.events.globalApiPreHandlers.prepareEditor.  For this one,
it also seems like it would be better to do the HTML->wikitext conversion on
the server if possible, rather than round-trip a XHR call then post.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to