]> git.gir.st - VimFx.git/commit
experimental custom-element support
authorgirst <girst@users.noreply.github.com>
Sat, 24 Aug 2019 00:55:41 +0000 (02:55 +0200)
committergirst <girst@users.noreply.github.com>
Fri, 30 Aug 2019 16:59:33 +0000 (18:59 +0200)
commitb9bcc2972247636e0d5e0cc41500e127147ae160
treefab97390207dd3c4334b21c0d23ff2549d5a9972
parentefdb3530bc7e471e189775d05691758ca66fa9e6
experimental custom-element support

Web Components / HTML5 Custom Elements were previously inaccessible to
VimFx. Examples of heavy users of this technology is about:logins
(Firefox 70) and bugs.chromium.org. Elements within the shadow DOM were
unable to be selected with hints mode.

VimFx' non-XUL DOM traversal routine was extended to not only search the
(regular) DOM, but also check each element if it contains an open shadow
DOM, and traverse it too. Interestingly, getElementsByTagName is not
defined by the DocumentOrShadowRoot class, only querySelectorAll.

Further, it appears that the native C++ function VimFx uses to send key
events to clickable elements is unable to be used inside the shadow DOM,
resulting in the error message below.
    NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMWindowUtils.dispatchDOMEventViaPresShell] utils.js:291

NOTE: This regression has made it obvious that VimFx uses isXULDocument
to make assumptions about the document it is looking at that no longer
hold when WebComponents are involved. More might be unearthed in the
future.

NOTE: the URL for an entry in about:logins is not clickable, as it is a
read-only text input with an onclick handler, instead of a link. That
edge case is not handled by utils.isTypingElement().
extension/lib/commands-frame.coffee
extension/lib/events-frame.coffee
extension/lib/markable-elements.coffee
extension/lib/utils.coffee
Imprint / Impressum