From fd6673cfb87087dd3028592e02070d39a58eb62a Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 11 Nov 2020 14:41:29 +0100 Subject: [PATCH] Correct step in matches() It needs to pass this rather than an undefined variable. Also clean up the algorithm a bit. Fixes #921. --- dom.bs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/dom.bs b/dom.bs index 2a7c77e07..165529bc8 100644 --- a/dom.bs +++ b/dom.bs @@ -6796,23 +6796,20 @@ method, when invoked, must run these steps:
  • Return null. -The matches(selectors) and -webkitMatchesSelector(selectors) methods, when -invoked, must run these steps: +

    The matches(selectors) and +webkitMatchesSelector(selectors) method steps +are:

      -
    1. Let s be the result of - parse a selector from selectors. +
    2. Let s be the result of parse a selector from selectors. [[!SELECTORS4]] -

    3. If s is failure, throw a - "{{SyntaxError!!exception}}" {{DOMException}}. +
    4. If s is failure, then throw a "{{SyntaxError!!exception}}" + {{DOMException}}. -

    5. Return true if the result of - match a selector against an element, using - s, element, and - :scope element this, - returns success, and false otherwise. [[!SELECTORS4]] +
    6. If the result of match a selector against an element, using s, + this, and :scope element this, returns success, then return true; otherwise, + return false. [[!SELECTORS4]]


    @@ -10000,6 +9997,7 @@ Chris Dumez, Chris Paris, Chris Rebert, Cyrille Tuzi, +Dan Burzo, Daniel Glazman, Darin Fisher, David Bruant,