User:Harthur/XBL2/Assertions: Difference between revisions
Jump to navigation
Jump to search
| Line 20: | Line 20: | ||
|2 | |2 | ||
|The shadow tree is destroyed if a <tt>template</tt> element is removed from the <tt>binding</tt> element and the <tt>binding</tt> had one <tt>template</tt> element. | |The shadow tree is destroyed if a <tt>template</tt> element is removed from the <tt>binding</tt> element and the <tt>binding</tt> had one <tt>template</tt> element. | ||
|If the template element is removed, then the shadow tree must be destroyed.[http://www.w3.org/TR/xbl/#shadow http://www.w3.org/TR/xbl/#shadow] | |If the template element is removed, then the shadow tree must be destroyed. [http://www.w3.org/TR/xbl/#shadow http://www.w3.org/TR/xbl/#shadow] | ||
| | | | ||
| | | | ||
| Line 26: | Line 26: | ||
|3 | |3 | ||
|Only the first <tt>template</tt> child of a <tt>binding</tt> is used to generate shadow tree content on a bound element. | |Only the first <tt>template</tt> child of a <tt>binding</tt> is used to generate shadow tree content on a bound element. | ||
|The template element used to generate a binding is always the first such element in a binding element. [http://www.w3.org/TR/xbl/#shadow http://www.w3.org/TR/xbl/#shadow] | |The template element used to generate a binding is always the first such element in a binding element. [http://www.w3.org/TR/xbl/#shadow http://www.w3.org/TR/xbl/#shadow] | ||
| | | | ||
| [http://fayearthur.com/files/test_3.xhtml http://fayearthur.com/files/test_3.xhtml] | | [http://fayearthur.com/files/test_3.xhtml http://fayearthur.com/files/test_3.xhtml] | ||
Revision as of 19:22, 13 October 2009
adding a new assertion? Make sure you give it an id that hasn't been used and increment the assertion count afterwards.
assertion count: 336
The Shadow Tree
| Id | Assertion | Spec Reference | Comments | Tests |
| 1 | A shadow tree is generated if a template element is added to a binding element that had no template element. | A shadow tree must be generated if a template element is added to a binding element that had no template element.http://www.w3.org/TR/xbl/#shadow | ||
| 2 | The shadow tree is destroyed if a template element is removed from the binding element and the binding had one template element. | If the template element is removed, then the shadow tree must be destroyed. http://www.w3.org/TR/xbl/#shadow | ||
| 3 | Only the first template child of a binding is used to generate shadow tree content on a bound element. | The template element used to generate a binding is always the first such element in a binding element. http://www.w3.org/TR/xbl/#shadow | http://fayearthur.com/files/test_3.xhtml | |
| 4 | If the binding element is mutated in a way which changes which template element is the first child, then the shadow tree is regenerated to match the new first template | If the binding element is mutated in a way which changes which template element is the first, then the corresponding shadow tree must be regenerated. http://www.w3.org/TR/xbl/#shadow | ||
| 5 | A shadow tree is regenerated if the template element it was generated from or any of its descendants is mutated in any way. | when a template element or any of its descendants is mutated in any way, any bindings whose shadow tree was constructed from that element must be regenerated.http://www.w3.org/TR/xbl/#shadow | ||
| 6 | If a binding element has no template element, then no shadow content is generated for that binding. | If the binding element has no template element, then no shadow content will be generated for this binding. http://www.w3.org/TR/xbl/#rules | ||
| 7 | The shadow tree is a deep copy of the first template element of the binding element. | its first template element must be deeply cloned. http://www.w3.org/TR/xbl/#rules | ||
| 8 | The baseURI of a node in a shadow tree is the same as the baseURI of its template counterpart. | The xml:base data of the cloned template element must be set so that the baseURI of nodes in the resulting shadow tree is the same as their pre-cloning counterparts. http://www.w3.org/TR/xbl/#rules | ||
| 9 | The ownerDocument property on a shadow tree node points to the binding document's Document node. | All shadow nodes' ownerDocument pointers are left pointing at their binding documents' Document node(s). http://www.w3.org/TR/xbl/#rules | ||
| 10 | No mutation events fire because of shadow tree generation. | No mutation events must be fired during the above steps. http://www.w3.org/TR/xbl/#rules | ||
| 11 | When a shadow tree is generated from a template element, any bindings that apply to elements in the shadow tree are applied. | Any bindings that apply to elements in the shadow tree must be applied. http://www.w3.org/TR/xbl/#rules | ||
| 12 | The shadowTree member of the internal object of a binding is a reference to the shadow tree generated by the binding. | the shadowTree member of the internal object must be set to be a reference to the template element clone (the root of the shadow tree). http://www.w3.org/TR/xbl/#rules | js only, definition internal object: http://www.w3.org/TR/xbl/#internal. Will depend on this for a lot of tests. | |
| 13 | Author scripts are not executed during shadow tree generation. | the UA must not execute author scripts during this process. http://www.w3.org/TR/xbl/#rules | ||
| 14 | When a shadow tree is destroyed the shadowTree member of the internal object is set to null. | the shadowTree member of the internal object must be set to null.http://www.w3.org/TR/xbl/#rules0 | js only |
The Shadow Tree - Attribute Forwarding
| Id | Assertion | Spec Reference | Comments | Tests |
| 15 | If an item from the space-separated list from xbl:attr does not match the BNF pattern [s1 ':'] s2 ['=' [s3 ':'] s4] ['#' s5] (where s1..s5 are strings of characters not containing any of ":". "=", or "#") then it is ignored and not forwarded. | The xbl:attr attribute's value must be parsed as follows. First, it must be split on spaces (treated as a space-separated value). Next, each resulting item must be matched against the following pattern (given here in pseudo-BNF, where square brackets indicate optional terms): xbl inherits item := [s1 ':'] s2 ['=' [s3 ':'] s4] ['#' s5] ...where s1..s5 are strings of characters not containing any of ":". "=", or "#". If any item does not match this pattern, then the item is in error and must be ignored. Other items in the list, if any, are not affected by this. http://www.w3.org/TR/xbl/#attribute | ||
| 16 | If an item from the xbl:attr list is not a valid QName or QName=QName pair, then that item is ignored. | The values s1:s2 and s3:s4 (if present) must be resolved to fully qualified names using the attribute QName resolving semantics and the namespaces prefix declarations in scope on the element on which the xbl:attr attribute is found, at the time that the attribute is parsed. Any value in the list that does not resolve to a fully qualified name is in error and must be ignored.http://www.w3.org/TR/xbl/#attribute | definition 'QName': http://www.w3.org/TR/2006/REC-xml-names-20060816/#ns-qualnames | |
| 17 | Changes to namespace prefix definitions in the shadow tree that affect QNames used in xbl:attr attributes take effect the next time the attribute is parsed (which must be the next time the attribute is changed, but may be earlier). | Changes to namespace prefix definitions in the shadow tree that affect QNames used in xbl:attr attributes take effect the next time the attribute is parsed (which must be the next time the attribute is changed, but may be earlier)' http://www.w3.org/TR/xbl/#attribute | ||
| 18 | When xbl:text is specified on the left hand side of a =-separated item, the value of the attribute specified by the right-hand side on the bound element is represented as a text node underneath the corresponding shadow element in the final flattened tree. | When specified on the left-hand side of the pair it indicates that the value of the attribute on the right-hand side are to be represented as text nodes underneath the shadow element in the final flattened tree.http://www.w3.org/TR/xbl/#forwarding | Specifies behavior of text forwarding | |
| 19 | If xbl:text is specified on the left-hand side of a =-separated item in xbl:attr and the shadow node has any child nodes in the DOM, then the text is not forwarded. | If the element* has any child nodes in the DOM (any nodes, including comment nodes, whitespace text nodes, or even empty CDATA nodes) then the pair is in error and UAs must ignore it, meaning the attribute value is not forwarded. Otherwise, a text node must be created, and that text node will be placed under the element in the final flattened tree. http://www.w3.org/TR/xbl/#forwarding | ||
| 20 | The parentNode, nextSibling, previousSibling, childNodes, firstChild, and lastChild attributes of text nodes created by xbl:text forwarding are null or empty. | Text nodes created in this way are orphans; their parentNode, nextSibling, previousSibling, childNodes, firstChild, and lastChild attributes are all null or empty http://www.w3.org/TR/xbl/#forwarding | ||
| 21 | The ownerDocument attribute of a text node created by xbl:text forwarding is set to the same as the shadow content node that generated it. | Their ownerDocument attribute is set to the same as the shadow content node that generated them. http://www.w3.org/TR/xbl/#forwarding | ||
| 22 | When xbl:text is specified on the right hand side of a =-separated item in xbl:attr, then any text nodes (including CDATA nodes and whitespace text nodes) that are explicit children of the bound element have their data concatenated and the resulting value stored as the attribute on the left-hand side. | When used on the right-hand side, it indicates that any text nodes (including CDATA nodes and whitespace text nodes) that are explicit children of the bound element must have their data concatenated and the resulting value stored as the attribute on the left-hand side. http://www.w3.org/TR/xbl/#forwarding | ||
| 23 | If xbl:text occurs by itself as an item in xbl:attr (not in a =-separated item), then it is ignored. | The xbl:text value cannot occur by itself in the list. If it occurs by itself, it is in error and UAs must ignore that value in the space-separated list that is the xbl:attr attribute. http://www.w3.org/TR/xbl/#forwarding | ||
| 24 | When xbl:lang is specified on the right-hand side of an =-separated item in xbl:attr then the attribute specified by the left hand side is set to the natural language of the bound element or the empty string if no language is defined. | When used on the right-hand side, it indicates that the value to be copied is the natural language of the bound element, typically given by the attribute xml:lang of that element or an ancestor, or by HTTP headers, or similar. If no language is defined, then the value to be copied must be the empty string.http://www.w3.org/TR/xbl/#forwarding0 | ||
| 25 | When xbl:lang occurs by itself or on the left-hand side of an xbl:attr, it is ignored. | The xbl:lang value cannot occur by itself or on the left-hand side. If it does, it is in error and UAs must ignore that value in the element's xbl:attr attribute. http://www.w3.org/TR/xbl/#forwarding0 | ||
| 26 | If an element in the XBL namespace other than xbl:text or xbl:lang is an item in xbl:attr, then it is ignored | Any other values in the XBL namespace in the list are in error and must be ignored. (In particular, trying to change or set the value of xbl:pseudo or, worse, xbl:attr, must not result in any changes to any attributes.)http://www.w3.org/TR/xbl/#error0 | ||
| 27 | If an attribute is listed multiple times on the left hand side of an xbl:attr item or on its own, then the last listing is forwarded. | If an attribute is listed multiple times on the left hand side (or on its own), then the last designation wins (as if the attributes were each forwarded in turn, an earlier forwarding being overwritten by a later one). http://www.w3.org/TR/xbl/#error0 | ||
| 28 | If an item in the xbl:attr list is followed by a #url, then the value of the attribute on the shadow node is set to the value of the attribute from the bound element, resolved into an absolute URI using the base URI of the bound element. | The value must be resolved to an absolute URI using the base URI of the source element before being forwarded.http://www.w3.org/TR/xbl/#type-specifiers | ||
| 29 | If an item in the xbl:attr list is followed by a #text designation, then the value of the attribute on the shadow element is set to the value of the attribute on the bound element. | The value is forwarded unchanged.http://www.w3.org/TR/xbl/#type-specifiers | ||
| 30 | If an item in the xbl:attr list is followed by a designation other than #url or #text, then that item is ignored. | 'The attribute must not be forwarded. The value is in error and UAs must ignore that value in the element's xbl:attr attribute.http://www.w3.org/TR/xbl/#type-specifiers | ||
| 31 | If an item in the xbl:attr list is a valid single item without a type designation, then the value of the attribute on the shadow node is set to the value of that attribute on the bound element when the attribute is set on the bound element or it is removed from the shadow node when that attribute is removed from the bound element. | whenever the attribute is set or removed on the bound element, the corresponding attribute on the shadow content is also set or removed.http://www.w3.org/TR/xbl/#attribute1 | ||
| 32 | If an item in the xbl:attr list is a valid =-separated pair without a type designation, then the value of the attribute specified by the left-hand side is set on the shadow node to the value of the attribute specified by the right-hand side on the bound element. | whenever the attribute is set or removed on the bound element, the corresponding attribute on the shadow content is also set or removed. When two names are specified, the attribute to be added on the shadow content node is listed first, and the attribute of the bound element is second. http://www.w3.org/TR/xbl/#attribute1 |
||
| 33 | When the value of xbl:attr is applied, if an attribute to be forwarded exists on the bound element and it's corresponding attribute exists on the shadow tree element, then the shadow tree element's attribute is changed to the appropriate value. | Whenever attribute forwarding happens: existing attributes to which values are being forwarded must have their values changed http://www.w3.org/TR/xbl/#how-attribute | ||
| 34 | When the value of xbl:attr is applied, if an attribute to be forwarded exists on the bound element, but not on the shadow tree element, then it is added to the shadow tree element. | attributes that are being forwarded that do not yet exist on the shadow tree element must be added to the shadow tree element http://www.w3.org/TR/xbl/#how-attribute | ||
| 35 | When the value of xbl:attr is applied, if an attribute to be forwarded is not present on the bound element, then that attribute is removed from the shadow node. | attributes to which values would be forwarded but whose source attributes are not present on the bound element must be removed from the shadow tree element.http://www.w3.org/TR/xbl/#how-attribute | ||
| 36 | The value of xbl:attr is applied when the shadow tree is generated. | It must be applied (causing the relevant attributes and text nodes to be updated) when the shadow tree is generated http://www.w3.org/TR/xbl/#dynamic | ||
| 37 | The value of xbl:attr is applied when the xbl:attr attribute itself is changed. | It must be applied (causing the relevant attributes and text nodes to be updated)...when the attribute is changed http://www.w3.org/TR/xbl/#dynamic | ||
| 38 | The value of xbl:attr is applied whenever any of the bound element's attributes or text nodes referred to by the xbl:attr attribute change. | It must be applied (causing the relevant attributes and text nodes to be updated)...whenever any of the bound element's attributes or text nodes referred to by the xbl:attr attribute change.http://www.w3.org/TR/xbl/#dynamic |
The Shadow Tree - Explicit Children
| Id | Assertion | Spec Reference | Comments | Tests |
| 39 | If an element stops matching a content element that it is assigned to, then the bound element's explicit children are re-distributed. | If an element stops matching a content element that it is assigned to, then the bound element's explicit chlidren must be redistributed. http://www.w3.org/TR/xbl/#processing2 | ||
| 40 | If no includes attribute is specified on a content element, that content element will match on all content. | If no includes attribute is specified, a content element is considered generic and will match on all content, including text nodes, CDATA nodes, comments, and so on. http://www.w3.org/TR/xbl/#how-nodes | ||
| 41 | If the includes attribute is specified on a content element, then only explicit children that match the selector specified by the value of includes apply to that content element. | If the includes attribute is specified, it must be interpreted as a selector, and only elements that match the selector apply to that content element. http://www.w3.org/TR/xbl/#how-nodes | ||
| 42 | If the value of the includes attribute is an invalid selector, the content element does not match any explicit children. | If the selector is invalid, the content element is in error and does not match any nodes. http://www.w3.org/TR/xbl/#how-nodes | ||
| 43 | Matching of the elements to the selector in the includes attribute of a content element is done without taking into account the shadow tree in which the content element itself is found. | Matching of the elements to the selector is done without taking into account the shadow tree in which the content element itself is found. http://www.w3.org/TR/xbl/#how-nodes | ||
| 44 | If before distribution a node was assigned to a content element that was locked, then after re-distribution, that node is still assigned to the same content element and only that content element. | If the node is already assigned to a content element for this binding, and the content element is locked, then that is the content element to which the node must be assigned, stop here.http://www.w3.org/TR/xbl/#how-nodes | ||
| 45 | If a binding's shadow tree contains a valid content element that is not locked and whose includes attribute matches an explicit child, then the first such element in a a depth-first, pre-order traversal of the shadow template is the content element to which that explicit child is assigned and is the only such content element to which it is assigned. | If T contains a correct content element that is not locked and to which the node in question applies, then the first such element in a depth-first, pre-order traversal of the shadow tree T is the content element to which the node must be assigned, stop here.http://www.w3.org/TR/xbl/#how-nodes | ||
| 46 | If an explicit child does not match any valid content element that is not locked and the shadow tree has no valid inherited element, then it does not appear in the final flattened tree. | Otherwise, if this binding has no correct inherited element in its shadow tree, then the node is not assigned to a content element, and does not appear in the final flattened tree; stop here.http://www.w3.org/TR/xbl/#how-nodes | ||
| 47 | If an explicit child does not match any valid content element that is not locked and the shadow tree has a valid inherited element but it is the least derived binding with a shadow tree, then it does not appear in the final flattened tree. | Otherwise, if the binding has a correct inherited element in its shadow tree but it is the least derived binding with a shadow tree, then the node is not assigned to a content element, and does not appear in the final flattened tree; stop here.http://www.w3.org/TR/xbl/#how-nodes | def 'least derived binding' : http://www.w3.org/TR/xbl/#binding1 | |
| 48 | If an explicit child does not match any content element in the shadow tree and there is a valid inherited element in the shadow tree, then it is assigned to the first content element in the implicit inheritance chain that it matches. | Otherwise, let T be the shadow tree of the next most derived binding with a shadow tree and return to step 4 http://www.w3.org/TR/xbl/#how-nodes | definition implicit inheritance chain: http://www.w3.org/TR/xbl/#implicit1 | |
| 49 | If two nodes are assigned to a content element, their order in the xblChildNodes list of the content element is the same as their relative order in the childNodes list of the bound element. | The explicit children must be processed in order, so if two nodes are assigned to a content element, their order in the xblChildNodes list is the same as their relative order in the explicit children list.http://www.w3.org/TR/xbl/#how-nodes | ||
| 50 | Explicit children are assigned to content elements when a shadow tree is generated. | A shadow tree is generated.http://www.w3.org/TR/xbl/#when-nodes | ||
| 51 | Explicit children are assigned to content elements when a shadow tree is destroyed and the bound element still has bindings with shadow trees. | A shadow tree is destroyed and the bound element still has bindings with shadow trees.http://www.w3.org/TR/xbl/#when-nodes | ||
| 52 | Explicit children are assigned to content elements when the bound element has explicit children added, removed, or moved. | The bound element has explicit children added, removed, or moved.http://www.w3.org/TR/xbl/#when-nodes | ||
| 53 | Explicit children are assigned to content elements when a shadow tree is modified in a way that affects the relative order of content elements or their includes attributes. | A shadow tree is modified in a way that affects the relative order of content elements or their includes attributes.http://www.w3.org/TR/xbl/#when-nodes | ||
| 54 | Explicit children are assigned when an includes attribute in the shadow tree is mutated. | An includes attribute in the shadow tree is mutated.http://www.w3.org/TR/xbl/#when-nodes | ||
| 55 | Explicit children are assigned when one or more of the nodes assigned to a content element in a shadow tree no longer match the element's includes attribute. | One or more of the nodes assigned to a content element in a shadow tree no longer match the element's includes attribute.http://www.w3.org/TR/xbl/#when-nodes | ||
| 56 | A content element with locked set to true cannot accept new children unless they are explicitly assigned to it using the setInsertionPoint() method. | A locked content element cannot accept new children unless they are explicitly assigned to it using the setInsertionPoint() method http://www.w3.org/TR/xbl/#handling4 |
Final Flattened Tree
| Id | Assertion | Spec Reference | Comments | Tests |
| 57 | The final flattened tree of a bound element consists of the child nodes of the most derived shadow tree's root template element, where content elements are replaced by the nodes that were assigned to them (or their child nodes if none were assigned), and where the first inherited element is replaced by the final flattened tree of the next most derived binding or, if there is no less-derived binding with a shadow tree, with the child nodes of the inherited element itself and subsequent inherited elements are replaced by their contents. | 2. Otherwise, replace the child nodes of the bound element with the child nodes of the most derived shadow tree's root template element. 3. For any element in the shadow tree that has an xbl:attr attribute that uses the xbl:text value on the left hand side in a way that is not in error, let the element's only child node be the attribute-forwarding text node. (If the element in question has any child nodes, then the xbl:text value will be in error.) 4. Replace any content elements in the shadow tree with the nodes that were assigned to them in the previous section, unless there are no such nodes, in which case replace them with their child nodes. 5. Replace the second and subsequent inherited elements in the shadow tree with their child nodes. 6. Replace the first inherited element in the shadow tree, if any, with the child nodes of the next most derived binding's shadow tree's root template element, or, if there is no less-derived binding with a shadow tree, with the child nodes of the inherited element itself. 7. If the previous step added a shadow tree to the flattened tree, then return to step 3 to deal with that newly added shadow tree. Otherwise, move on to the next bound element. http://www.w3.org/TR/xbl/#final0 | reftests, a lot of them, using "Rendering must be performed using the final flattened tree", "Nodes that do not appear in the final flattened tree are not rendered" http://www.w3.org/TR/xbl/#final0 |
The Shadow Tree - CSS
| Id | Assertion | Spec Reference | Comments | Tests |
| 58 | The selector 'A>B' does not match a shadow tree node if it's parentNode (or parentNode.parentNode if the parentNode is a content or inherited node) is the root of a shadow tree but the binding's allow-selectors-through attribute is not true. | If "B" is in a shadow tree and "B.parentNode" is a content element or an inherited element, let "X" be "B.parentNode.parentNode", otherwise let "X" be "B.parentNode". Now if "X" is the root of a shadow tree, but the binding's "allow-selectors-through" is not true, the selector doesn't match "B".http://www.w3.org/TR/xbl/#selectors1 |
||
| 59 | The selector 'A>B' matches a shadow tree node if it's parentNode (or parentNode.parentNode if the parentNode is a content or inherited element) is A and is not the root of a shadow tree. | Otherwise, if "X" is the root of a shadow tree and the binding's "allow-selectors-through" is true and the binding is the bound element's most derived binding with a shadow tree, then let "X" be the bound element for which the shadow tree was generated. Otherwise, if "X" is the root of a shadow tree and the binding's "allow-selectors-through" is true but the binding is not the bound element's most derived binding with a shadow tree, then let "X" be the parent node of the inherited element into which the shadow tree was placed during the construction of the final flattened tree; if this is itself the root of a shadow tree, then repeat the steps described in this paragraph using that element as "X". Then, the selector matches "B" if the "X" element is the "A" element.http://www.w3.org/TR/xbl/#selectors1 | ||
| 336 | The selector 'A>B' matches a shadow tree node B if it's parentNode (or parentNode.parentNode if the parentNode is a content or inherited element) is A and is the root of a shadow tree and the bindings allow-selectors-through attribute is true and it is the most derived binding with a shadow tree. | Otherwise, if "X" is the root of a shadow tree and the binding's "allow-selectors-through" is true and the binding is the bound element's most derived binding with a shadow tree, then let "X" be the bound element for which the shadow tree was generated. Then, the selector matches "B" if the "X" element is the "A" element.http://www.w3.org/TR/xbl/#selectors1 | ||
| 60 | The selector "A B" matches a node if B if that node matches B and either "A>B" matches "B", or "C>B" matches "B" and "A C" matches "C". | The selector "A B" matches a node if B if that node matches B and either "A>B" matches "B", or "C>B" matches "B" and "A C" matches "C".http://www.w3.org/TR/xbl/#selectors1 | ||
| 61 | The selector "A+B" does not match if "B" is in a shadow tree and "B.previousSibling" is a content element or an inherited element. | If "B" is in a shadow tree and "B.previousSibling" is a content element or an inherited element, the selector doesn't match "B". http://www.w3.org/TR/xbl/#selectors1 | ||
| 62 | The selector "A+B" matches "B" if "B.previousSibling" is "A" and "B.previousSibling" is not a content element or an inherited element. | otherwise, it matches if "B.previousSibling" is "A". http://www.w3.org/TR/xbl/#selectors1 | ||
| 63 | The selector "A~B" matches "B" if either "A+B" matches "B", or if "C+B" matches "B" and "A~C" matches "C". | Matches "B" if either "A+B" matches "B", or if "C+B" matches "B" and "A~C" matches "C". http://www.w3.org/TR/xbl/#selectors1 | ||
| 64 | Pseudo-classes and pseudo-elements are unchanged in the presence of XBL. They operate exclusively on the core DOM. | Pseudo-classes and pseudo-elements are unchanged in the presence of XBL. They operate exclusively on the core DOM. | tricky, see example: http://www.w3.org/TR/xbl/#selectors | |
| 65 | Elements inherit CSS properties from their parent node in the final flattened tree. | The final flattened tree determines how CSS properties (e.g., fonts and colors) are inherited. Elements must inherit from their parent node in the final flattened tree, regardless of what their DOM Core parent node is.http://www.w3.org/TR/xbl/#css-property1 | ||
| 66 | Elements not in the final flattened tree have no computed style and are not rendered. | Nodes that do not appear in the final flattened tree have no computed style (as if they were orphan nodes) and are not rendered.http://www.w3.org/TR/xbl/#css-property1 | ||
| 67 | The :bound-element pseudo-class, when used from a binding, matches the bound element of that binding. | The :bound-element pseudo-class, when used from a binding, must match the bound element of that binding. http://www.w3.org/TR/xbl/#the-bound-element | ||
| 68 | The :bound-element pseudo-class, when used in a place other than a binding's style sheet or a content element's includes attribute, matches any bound element. | 'If the selector is used somewhere other than in a binding's style sheet (i.e. with a style element in XBL) or in a content element's includes attribute, then it must match any bound element. http://www.w3.org/TR/xbl/#the-bound-element. | ||
| 69 | If the value of the tt>xbl:pseudo attribute of a shadow node is not "value", "choices", "label", "repeat-item", or "icon", then the attribute is ignored. | The allowed pseudo-elements are: ::value ... ::choices...::label...::repeat-item...::icon The pseudo must be given without its leading double colon. If the pseudo-element name is not recognized, it is in error and the UA must ignore the attribute. User agents must not automatically recognize any pseudo-element.http://www.w3.org/TR/xbl/#pseudo-list |
||
| 70 | If the value of xbl:pseudo on a shadow node is valid then that value is used to specify the name of the pseudo element to associate with that element. | xbl:pseudo attribute (in the XBL namespace) can be used to specify the name of the pseudo to associate with that element.http://www.w3.org/TR/xbl/#pseudo-list | details left up to UA , http://www.w3.org/TR/xbl/#pseudo-list | |
| 71 | If an element has multiple nodes with the same xbl:pseudo pseudo-element, then they all match a relevant selector. | If an element has multiple nodes with the same pseudo-element, then they all match the relevant selector.http://www.w3.org/TR/xbl/#matching1 | ||
| 72 | A shadow tree node matches a relevant selector by its pseudo-element even if the apply-author-sheets attribute of it's cooresponding template element is not true. | Matching of nodes based on their pseudo-element is unaffected by the apply-author-sheets attribute.http://www.w3.org/TR/xbl/#matching1 |
The Shadow Tree - Other
| Id | Assertion | Spec Reference | Comments | Tests |
| 73 | Relative xml:bases on nodes in shadow trees are resolved relative to their parentNode, or the ownerDocument if there is no parentNode. | Relative xml:bases on nodes in shadow trees are resolved relative to their parentNode, or the ownerDocument if there is no parentNode. http://www.w3.org/TR/xbl/#matching1 | ||
| 74 | IDs used in shadow content, as seen on XML Events nodes, in XHTML on the html:label element's for attribute, and in many other places, must be resolved in the context of the shadow scope and (failing that) the binding document, not the scope of the document into which the shadow content is inserted. | IDs used in shadow content, as seen on XML Events nodes, in XHTML on the html:label element's for attribute, and in many other places, must be resolved in the context of the shadow scope and (failing that) the binding document, not the scope of the document into which the shadow content is inserted.http://www.w3.org/TR/xbl/#general | ||
| 75 | An html:style element placed in a template element does not affect documents into which the shadow content is later inserted during binding attachment. | Such an element placed in a shadow content template does not affect the documents into which the shadow content is later inserted during binding attachment.http://www.w3.org/TR/xbl/#style3 | ||
| 76 | html:script elements are evaluated in the context of the XBL subtree's document and not during binding attachment. | Therefore such elements must only be evaluated during initial parsing, in the context of the XBL subtree's document, and not during binding attachment.http://www.w3.org/TR/xbl/#script3 | ||
| 77 | XML Events elements in the binding document result in event handlers being registered as event listeners on the nodes in the original bindings document. | XML Events elements in the binding document must result in event handlers being registered as event listeners on the nodes in the original bindings document (including possibly the template node) as described in XML Events.http://www.w3.org/TR/xbl/#event10 | ||
| 78 | If an XML Event is registered on a template element in the binding document and the template is cloned, the newly cloned even handlers cause new event listeners to be added to their new DOM Core parent nodes. | They may be included in shadow content templates, but when the shadow content template is cloned, the newly cloned event handlers must cause new event listeners to be added to their new DOM Core parent nodes. http://www.w3.org/TR/xbl/#event10 | ||
| 79 | html:forms and form controls in shadow trees don't interact with form controls and form elements in the bound document. | Forms and form controls in shadow trees don't interact with form controls and form elements in the bound document.http://www.w3.org/TR/xbl/#html-forms | see example http://www.w3.org/TR/xbl/#html-forms |
The Shadow Tree - SVG
| Id | Assertion | Spec Reference | Comments | Tests |
Binding Style Sheets
| Id | Assertion | Spec Reference | Comments | Tests |
| 80 | When a bound element has multiple bindings, the style sheets from each binding apply. | When multiple bindings are applied to the same bound element, the sheets from each binding all contribute to the final set of style sheets to apply. http://www.w3.org/TR/xbl/#binding22 | ||
| 81 | The style sheets of the most derived binding are walked first. | the style sheets of the most derived binding being walked first.http://www.w3.org/TR/xbl/#binding22 | ||
| 82 | Within a binding, sheets loaded with the xbl style element apply first, then sheets that are attached using the DOM or using <?xbl?> and author-level style sheets. | For each binding, the style sheets that apply are as follows, in the order given: Scoped style sheets: A binding file can load style sheets using the style element...Author style sheets: While the apply-author-sheets attribute on the template element found at the root of the element's shadow tree is set to true, the rules specified in any author style sheets at outer shadow scopes (including those promoted to outer scopes using apply-binding-sheets, as defined below) must be applied to the shadow content...Style sheets used by bindings that are attached using the DOM or using <?xbl?> are treated as author-level sheets. http://www.w3.org/TR/xbl/#binding22 |
||
| 83 | If the binding was attached using CSS, the scoped style sheets have the same CSS origin as the sheet with the rule responsible for the binding. | If the binding was attached using CSS, the scoped style sheets have the same CSS origin as the sheet with the rule responsible for the binding. http://www.w3.org/TR/xbl/#binding22 | ||
| 84 | Style sheets loaded with the style element are applied to the bound element and to all shadow content attached to the bound element. | These style sheets must be applied to the bound element and to all shadow content attached to the bound element. http://www.w3.org/TR/xbl/#binding22 | ||
| 85 | When bindings from multiple levels are applied to the same bound element, the style sheets that apply cascade according to their own levels. | When bindings from multiple levels are applied to the same bound element, the style sheets that apply must cascade according to their own levels. http://www.w3.org/TR/xbl/#binding3 | ||
| 86 | When the apply-author-sheets attribute on the template element is true, the rules specified in any author style sheets at the outer shadow scopes (including those promoted to outer scopes using apply-binding-sheets) apply to the shadow tree. | While the apply-author-sheets attribute on the template element found at the root of the element's shadow tree is set to true, the rules specified in any author style sheets at outer shadow scopes (including those promoted to outer scopes using apply-binding-sheets, as defined below) must be applied to the shadow content.http://www.w3.org/TR/xbl/#binding3 | testcase for apply-binding-sheets case | |
| 87 | When the apply-author-sheets attribute on the template element is not true, only style rules matched through predefined pseudo-elements are applied to the shadow content. | Otherwise, only those matched through predefined pseudo-elements are used, and other author-level sheets in higher shadow scopes must not be applied to the shadow content.http://www.w3.org/TR/xbl/#binding3 | ||
| 88 | The style sheets in higher shadow scopes always apply to the bound element. | The bound element is always styled using the sheets of higher shadow scopes.http://www.w3.org/TR/xbl/#binding3 | ||
| 89 | style sheets specified in bindings do not apply to content other than the bound element or its shadow tree. | By default, style sheets specified in bindings (as described above) are applied only to shadow content generated by bindings attached to the bound element and to the bound element itself.http://www.w3.org/TR/xbl/#binding3 | ||
| 90 | When the apply-binding-sheets attribute on a content element is true then any nodes that are assigned to that element, and any descendants of those nodes, have the scoped style sheets of the binding (those that apply to the shadow content) applied to them too. | A second attribute, apply-binding-sheets, can be used to indicate that all descendants of the bound element, both shadow and explicit, can be styled by the sheets in the binding's document. This can be controlled on a per-insertion-point basis. While this attribute is set to true on a content node in the shadow tree DOM, any nodes that are assigned to that element, and any descendants of those nodes, must have the scoped style sheets of the binding (those that apply to the shadow content as described above) applied to them too, as if they had been promoted to the higher scope. http://www.w3.org/TR/xbl/#binding3 | ||
| 91 | Style rules specified in inner shadow scopes are overridden by rules of equal specificity in outer shadow scopes. | Sheets within each origin are always walked from the innermost shadow scope to the outermost shadow scope (with rules in the outermost shadow scope therefore overriding rules of equal specificity in the innermost shadow scope). http://www.w3.org/TR/xbl/#binding3 | [inner shadow scope http://www.w3.org/TR/xbl/#shadow9] | |
| 92 | On a bound element with multiple bindings, style rules specified in a more base binding are overridden by rules of equal specificity in an more derived binding. | For multiple bindings attached to the same element, the sheets are walked from the base binding to the most derived binding.http://www.w3.org/TR/xbl/#binding3 | ||
| 93 | User agent style sheets are applied to all shadow content. | User agent style sheets and user style sheets: These are always applied to all shadow scopes. http://www.w3.org/TR/xbl/#binding3 | ||
| 94 | User style sheets are applied to all shadow content. | User agent style sheets and user style sheets: These are always applied to all shadow scopes. http://www.w3.org/TR/xbl/#binding3 | ||
| 95 | Infinite loops where an author style sheet binds an element to a binding, and that binding sets the binding to none or another binding don't prevent users from interacting with the user agent. | Since styles from both author style sheets and binding style sheets are applied to the bound element, it is possible for an infinite loop to form where an author sets the 'binding' property to a particular binding that then explicitly sets the 'binding' property to 'none' (or another binding)...In so far as XBL is concerned, authors must avoid constructing such loops, and implementers must ensure that such loops do not prevent users from interacting with the user agent. http://www.w3.org/TR/xbl/#binding3 | ||
| 96 | Infinite loops where a binding constructor calls removeBinding() and the binding's detachment listener re-attaches the binding don't prevent the user for interacting with the user agent. | This specification does not take any precautions to avoid this, any more than it takes precautions to avoid loops caused by binding constructors explicitly calling removeBinding() to remove the binding itself and binding detachment event handlers reattaching the bindings. In so far as XBL is concerned, authors must avoid constructing such loops, and implementers must ensure that such loops do not prevent users from interacting with the user agent. |
Implementation
| Id | Assertion | Spec Reference | Comments | Tests |
| 97 | If the implementation object of a binding element has a method xblBindingAttached() defined, that method is called after the binding is attached on the bound element. | The xblBindingAttached() method is called by the user agent after the binding has been attached.http://www.w3.org/TR/xbl/#the-xblimplementation | def 'implementation object' http://www.w3.org/TR/xbl/#binding4 | |
| 98 | If the implementation object of a binding element has a method xblEnteredDocument() defined then that method is called when the bound element or one of its ancestors, or one of the elements in a higher shadow scope, is inserted into the document. | The xblEnteredDocument() method is called by the user agent in two cases:...When the bound element, or one of its ancestors, or one of the elements in a higher shadow scope, is inserted into the document. http://www.w3.org/TR/xbl/#the-xblimplementation | ||
| 99 | If the implementation object of a binding element has a method xblEnteredDocument() defined then that method is called when the binding is attached if the bound element is already in the document. | The xblEnteredDocument() method is called by the user agent in two cases:...When the binding is originally attached, if the bound element is already in the document. http://www.w3.org/TR/xbl/#the-xblimplementation | ||
| 100 | If the implementation object of a binding element has a method xblLeftDocument() defined, then that method is called when the bound element or one of its ancestors is removed from the document. | The xblLeftDocument() method is called by the user agent when the bound element, or one of its ancestors, or one of the elements in a higher shadow scope, is removed from the document. http://www.w3.org/TR/xbl/#the-xblimplementation | ||
| 101 | If xblBindingAttached(), xblEnteredDocument(), or xblLeftDocument() is not defined on the implementation object, then nothing should happen when that method is invoked. | If the implementation does not define one of these methods, then when that method is invoked, nothing must happen (as if all bindings had default implementations of those methods that were no-ops). http://www.w3.org/TR/xbl/#the-xblimplementation | ||
| 102 | The xblImplementations attribute on all elements returns an instance of an XBLImplementationList object (the same object for the lifetime of the element), which is a live list of the implementation objects provided by the bindings for that bound element at any particular point in time. | The xblImplementations attribute on all elements must return an instance of an XBLImplementationList object (the same object for the lifetime of the element), which is a live list of the implementation objects provided by the bindings for that bound element at any particular point in time. http://www.w3.org/TR/xbl/#the-xblimplementationlist | ||
| 103 | The object returned by xblImplementations has a member length which returns the number of implementation objects associated with the bound element, or zero if the the element is not a bound element or if none of its bindings have implementations. | The length attribute must return the number of implementation objects associated with the bound element, or zero if the element is not a bound element or has none of its bindings have implementations.http://www.w3.org/TR/xbl/#length | ||
| 104 | The object returned by xblImplementations has a member item(n) which returns the nth implementation object associated with the bound element - ordered from most base to most derived binding. | The item(n) method must return the nth implementation object associated with the bound element. The list must be ordered such that the most derived binding is last, and the base binding has index zero.http://www.w3.org/TR/xbl/#itemn |
||
| 105 | If the item(n) method is invoked on an object returned by xblImplementations with an number not between zero and length - 1, then an INDEX_SIZE_ERR DOM exception is raised. | If the index is not a number between zero and length-1 (inclusive), then the method must raise an INDEX_SIZE_ERR DOM exception. http://www.w3.org/TR/xbl/#itemn | ||
| 106 | Objects returned by xblImplementations have a getter method that when invoked with a property name that is a number returns the item at that index in the list of implementations object associated with the bound element - ordered from most base to most derived binding. | In ECMAScript implementations, objects that implement the XBLImplementationList interface must also have a Get method that, when invoked with a property name that is a number, acts like the item() method would when invoked with that argument.http://www.w3.org/TR/xbl/#itemn | js only | |
| 107 | Any attempt to access a member of an element that does not coorespond to a method or property on the object itself but do coorespond to the member of one or more of the implementations on the xblImplementations list is forwarded to the last implementation in the xblImplementations list that is so matched. | in languages that support dynamic dispatch (such as ECMAScript), any attempts to access members of ElementXBL objects that do not correspond to methods or properties on the object itself but do correspond to members of one of the objects in the xblImplementations list must be forwarded to the last object in the xblImplementations list that is so matched.[hhttp://www.w3.org/TR/xbl/#accessingttp://www.w3.org/TR/xbl/#accessing ] | js only. test getters, setters, methods | |
| 108 | The first implementation element is used to create the implementation prototype object for the binding. | The first implementation element child of the binding element must have its code compiled and run (see below). The return value of that script, if it is an object, must be forever associated with that binding element as that binding's implementation prototype object.http://www.w3.org/TR/xbl/#ecmascript1 | js only. | |
| 109 | If a binding element doesn't contain an implementation element or it's implementation element does not evaluate to an object, then the binding's implementation prototype object is an empty object. | Otherwise, if the binding element doesn't contain an implementation element, or if it does but it does not evaluate to an object, then an empty object must be created (by invoking the Object constructor in the global scope of the binding document), and the binding element's implementation prototype object must be forever set to that object.http://www.w3.org/TR/xbl/#ecmascript1 | js only. | |
| 110 | Any change to the implementation element after assigning to the implementation prototype object will have no effect on the implementation prototype object. | Any further changes to implementation elements will have no effect on the implementation prototype object of this particular binding.http://www.w3.org/TR/xbl/#ecmascript1 | js only. | |
| 111 | The prototype property of the internal object must be set to the external object | The Prototype property of the internal object must be set to the external object. http://www.w3.org/TR/xbl/#ecmascript1 | js only. definition external object | |
| 112 | The prototype property of the external object must be set to the binding's implementation prototype object. | the Prototype property of the external object must be set to the binding's implementation prototype object.http://www.w3.org/TR/xbl/#ecmascript1 | js only | |
| 113 | The internal object has the field external defined and is a reference to the external object. | The internal object must then have the following fields defined: This field's value must be set to a reference to the external object. http://www.w3.org/TR/xbl/#external1 | js only | |
| 114 | The internal object has the field boundElement defined and it is a reference to the bound element. | The internal object must then have the following fields defined:...This field's value must be set to a reference of the node object that is the bound element.http://www.w3.org/TR/xbl/#boundelement | js only | |
| 115 | The internal object has the field shadowTree defined and it is set to null before shadow content generation. | The internal object must then have the following fields defined:...This field's value must be initially set to null.http://www.w3.org/TR/xbl/#shadowtree | js only | |
| 116 | The internal object has the field baseBinding defined and if the binding's extends attribute caused another binding to be attached to the bound element, then the baseBinding field is a reference to that binding's implementation object, otherwise it is set to null | If the binding's extends attribute caused another binding to be attached to the bound element, then the baseBinding field's value must be set to a reference of that binding's implementation object, if it has one (if that is an ECMAScript implementation as well, then that is that binding's external object). Otherwise, it must be set to the value null.http://www.w3.org/TR/xbl/#basebinding | js only | |
| 117 | When a function of an implementation object is called, this is a reference to the internal object associated with the external object on which the function was invoked. | When function code of an implementation object implemented in ECMAScript is called, the user agent must set the this value to the internal object associated with the external object on which the function was invoked.http://www.w3.org/TR/xbl/#invoking | js only |
Events
| Id | Assertion | Spec Reference | Comments | Tests |
| 118 | When an event passes through a bound element, whether during the capture, target, bubble, or default phases, any appropriate event listener attached to the binding's first handlers element is invoked. | Whenever an event passes through a bound element, whether during the capture, target, bubble, or default phases, the user agent must also invoke any appropriate event listeners attached to the binding's first handlers element. http://www.w3.org/TR/xbl/#event12 | several tests, maybe one file each for mutation events, keyboard events, mouse events | |
| 119 | If an event is in the capture phase, a handler attached to the first handlers element fires after an event handler on the bound element itself fires. | When events are forwarded in this manner, the event handlers attached to the handlers element must fire after any event handlers on the bound element itself in the capture phase. http://www.w3.org/TR/xbl/#event12 | ||
| 120 | If an event is in the capture phase, the target is the target shadow tree node. a handler attached to the handlers element fires after the event has been retargeted to the shadow node, if appropriate. | after the event has been retargeted to shadow nodes, if appropriate. http://www.w3.org/TR/xbl/#event12 | ||
| 121 | If an event is in the target or bubble phases, an event handler on the handlers element fires before any event handler on the bound element itself. | before any event handlers on the bound element itself in the target and bubble phases.http://www.w3.org/TR/xbl/#event12 | ||
| 122 | If an event is in the target or bubble phases, a handler attached to the handlers element fires before the event is retargeted to the bound element. | before the event has been retargeted to the bound element, if appropriate.http://www.w3.org/TR/xbl/#event12 | ||
| 123 | Event handlers fire first on the most derived binding and then on its inherited binding, continuing all the way up the chains to the base binding. | Event handlers must fire first on the most derived binding and then on its inherited binding, continuing all the way up the chains to the base binding.http://www.w3.org/TR/xbl/#event12 | ||
| 124 | An event handler of a binding will not fire if the event handler of a more derived binding called the stopImmediatePropogation() method. | A derived handler then has a way of preventing the event from flowing to the handlers of the bindings it inherits from, by using the stopImmediatePropagation() method.http://www.w3.org/TR/xbl/#event12 | ||
| 125 | Event handlers may be attached to the handlers by calling the addEventListener() method on the handlers element. | Event handlers may be attached to the handlers element using any method, including DOM3 Events' addEventListener() method. http://www.w3.org/TR/xbl/#event12 | maybe optional | |
| 126 | When the event or phase attribute of an handler element changes, or whenever a handler element's parent changes, any previous listener that was registered for that handler is removed and a new listener is registered on the element's parent element, if it has one. | Whenever the event or phase attributes of an XBL handler element change, or whenever a handler element's parent changes, an event listener must be registered on the element's parent element, if it has one; and if an event listener had previously been registered for that handler element, it must be removed.http://www.w3.org/TR/xbl/#registering1 | ||
| 127 | If the event attribute of a handler is missing or its value is the empty string, it is ignored. | If the event attribute is missing or its value is the empty string, it is in error. http://www.w3.org/TR/xbl/#registering1 | spec is not clear on what in error means, probably means handler is not fired for any event | |
| 128 | If the phase attribute is present but has a value other than the literal strings capture, target, bubble, or default-action, it is ignored. | If the phase attribute is present but has a value other than the literal strings capture, target, bubble, or default-action, it is in error.http://www.w3.org/TR/xbl/#registering1 | ||
| 129 | The script content of the handler element is run in the context of the binding document | The script must be run in the context of the binding document (and not, e.g., in the bound document's context.http://www.w3.org/TR/xbl/#registering1 | ||
| 130 | If the propagate attribute is specified on a handler element and its value is stop, then the event does not propagate after the handlers of the current node have been fired. | If stop is specified, then after the event handler has been fired, the event's stopPropagation() method must be called.http://www.w3.org/TR/xbl/#registering1 | ||
| 131 | If the default-action attribute is specified on a handler and its value is cancel, then the default action for the event is not performed. | If cancel is specified, then after the event handler has been fired, the event's preventDefault() method must be called. http://www.w3.org/TR/xbl/#registering1 | ||
| 132 | When the code of a handler is executed, this refers to the internal implementation object of the binding with which the handler is associated. | When a script of a handler element implemented in ECMAScript is executed the user agent must set the this value to the internal object part of the implementation object of the binding with which the handler element is associated. http://www.w3.org/TR/xbl/#event14 | ||
| 133 | When the code of a handler is executed, event refers to the Event object representing the event. | The script must be executed as a function body with one argument, called event, which is a reference to the Event object representing the event. | Will probably assume this for a bunch of tests anyways.http://www.w3.org/TR/xbl/#event14 | |
| 134 | The code executed when a handler is called reflects the current contents of the handler element. | The script must be compiled and executed each time it is accessed, so that any dynamic changes to the event handler code in the binding document take effect.http://www.w3.org/TR/xbl/#event14 | ||
| 135 | If the trusted attribute of a handler is specified and its value is true, any event whose trusted attribute is not true won't fire the handler. | The trusted attribute is a filter that, if set to the value true, matches only events whose trusted attribute is true. If any of them fail to match the event, then the invocation must not do anything else.http://www.w3.org/TR/xbl/#registering1 |
||
| 136 | If the phase attribute of the handler is specified and its value is capture, any event whose eventPhase attribute does not have the value CAPTURING_PHASE, then the handler does not fire. | If the attribute has the value capture, it must only match events whose eventPhase attribute has the value CAPTURING_PHASE If any of them fail to match the event, then the invocation must not do anything else. http://www.w3.org/TR/xbl/#registering1 |
||
| 137 | If the phase attribute of the handler is specified and its value is target, any event whose eventPhase attribute does not have the value AT_TARGET, then the handler does not fire. | If the attribute has the value target, it must only match events whose eventPhase attribute has the value AT_TARGET If any of them fail to match the event, then the invocation must not do anything else.http://www.w3.org/TR/xbl/#registering1 |
||
| 138 | If the phase attribute of the handler is specified and its value is default-action, any event whose eventPhase attribute does not have the value 0x78626C44, then the handler does not fire. | If the attribute has the value default-action, it must only match events whose eventPhase attribute has the value 0x78626C44 (2019716164). If any of them fail to match the event, then the invocation must not do anything else. http://www.w3.org/TR/xbl/#registering1 |
||
| 139 | If the phase attribute of the handler is specified and its value is anything other than default-action, target, or 0x78626C44, then any event whose eventPhase attribute does not have the value BUBBLE_PHASE, then the handler does not fire | If it is specified and has another value, it must only match events whose eventPhase attribute has the value BUBBLE_PHASE If any of them fail to match the event, then the invocation must not do anything else. http://www.w3.org/TR/xbl/#registering1 |
||
| 140 | If the phase attribute is not specified then an event whose eventPhase attribute does not have the value AT_TARGET or BUBBLE_PHASE does not invoke the listener for this handler. | If it is not specified, it must only match events whose eventPhase attribute has the value AT_TARGET (2) or BUBBLE_PHASE (3) If any of them fail to match the event, then the invocation must not do anything else. http://www.w3.org/TR/xbl/#registering1 |
||
| 335 | If the event is a MouseEvent and the handler's button attribute is specified and the button attribute of the event does not match one of the values in the space-separated list of the handler's button attribute, then the handler does not fire. | A list of values, at least one of which has to match the button attribute on the event object for the XBL event handler to fire. If the attribute is not specified, then any value of the button attribute on the event object must be considered a match. If the value is specified, it must be a space-separated list of values, each of which must be one or more digits in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Each string must be interpreted as a base ten integer and then compared to the value of the button attribute on the event object. If none of the values match the button attribute, then the event handler must not be executed. http://www.w3.org/TR/xbl/#mouse1 | ||
| 141 | If the event is a MouseEvent and the handler's click-count attribute is specified and the detail attribute of the event does not match one of the values in the space-separated list of the handler's click-count attribute, then the handler does not fire. | A list of values, at least one of which has to match the detail attribute on the event object for the XBL event handler to fire. If the attribute is not specified, then any value of the detail attribute on the event object must be considered a match. If the value is specified, it must be a space-separated list of values, each of which must be one or more digits in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Each string must be interpreted as a base ten integer and then compared to the value of the detail attribute on the event object. If none of the values match the detail attribute, then the event handler must not be executed.http://www.w3.org/TR/xbl/#mouse1 | ||
| 142 | If the event is a KeyboardEvent and the key attribute of the handler is specified and the value of the keyIdentifier attribute of the event does not exactly match its value, then the handler does not fire. | If specified, the value must be an exact literal match of the keyIdentifier attribute of the event object. For example, Enter. If any of them fail to match the event, then the invocation must not do anything else. http://www.w3.org/TR/xbl/#key-event1 |
||
| 143 | If the event is a KeyboardEvent and the key-location attribute of the handler this attribute's value must be a space-separated list of values from the four literal (case-sensitive) keywords standard, left, right, and numpad (with no duplicates), which map to the DOM values 0x00, 0x01, 0x02, or 0x03 respectively. | If specified, this attribute's value must be a space-separated list of values from the four literal (case-sensitive) keywords standard, left, right, and numpad (with no duplicates), which map to the DOM values 0x00, 0x01, 0x02, or 0x03 respectively. If specified, the event object's keyLocation attribute must have a value equal to the numeric value of one of the specified keywords. If any of them fail to match the event, then the invocation must not do anything else. http://www.w3.org/TR/xbl/#key-event1 |
||
| 144 | If the value of key-location contains an item other than standard, left, right, and numpad or contains a duplicate item, then that item is ignored. | Unknown and duplicate values are in error and UAs must ignore them (although without dropping any correct values).http://www.w3.org/TR/xbl/#key-event1 | ||
| 145 | If the event is a TextEvent and the text attribute of the handler is specified and its value is not equal to the value of the event's data attribute, then the handler is not fired. | The text data to match. If specified, the value must be an exact literal match of the data attribute of the event object. If any of them fail to match the event, then the invocation must not do anything else.http://www.w3.org/TR/xbl/#text-input1 |
||
| 146 | If the event is a MutationEvent and the prev-value attribute of the handler is specified and does not equal the value of the event's prevValue attribute, then the handler is not fired. | If specified, the value must be an exact literal match of the prevValue attribute of the event object. If any of them fail to match the event, then the invocation must not do anything else.http://www.w3.org/TR/xbl/#mutation1 |
http://fayearthur.com/files/test_146.xhtml | |
| 147 | If the event is a MutationEvent and the new-value attribute of the handler is specified and does not equal the value of the event's newValue attribute, then the handler is not fired. | If specified, the value must be an exact literal match of the newValue attribute of the event object. If any of them fail to match the event, then the invocation must not do anything else.http://www.w3.org/TR/xbl/#mutation1 |
||
| 148 | If the event is a MutationEvent and the attr-name attribute of the handler is specified and does not equal the value of the event's attrName attribute, then the handler is not fired. | If specified, the value must be an exact literal match of the attrName attribute of the event object. The value of the attribute may be any string. If any of them fail to match the event, then the invocation must not do anything else.http://www.w3.org/TR/xbl/#mutation1 |
||
| 149 | If the event is a MutationEvent and the attr-change attribute of the handler is specified , this attribute's value must be a space-separated list of values from the three literal (case-sensitive) keywords modification, addition, removal (with no duplicates), which map to the DOM values 0x00, 0x01, or 0x02 respectively. If specified, the event object's attrChange attribute must have a value equal to the numeric value of one of the specified keywords, otherwise the handler is not fired. | If specified, this attribute's value must be a space-separated list of values from the three literal (case-sensitive) keywords modification, addition, removal (with no duplicates), which map to the DOM values 0x00, 0x01, or 0x02 respectively. If specified, the event object's attrChange attribute must have a value equal to the numeric value of one of the specified keywords. If any of them fail to match the event, then the invocation must not do anything else. http://www.w3.org/TR/xbl/#mutation1 |
||
| 150 | If the value of attr-change attribute of a handler contains an item other than modification, addition, or removal or contains a duplicate item, then that item is ignored. | Unknown and duplicate values are in error and the UA must ignore them, although without causing correct values to be dropped. http://www.w3.org/TR/xbl/#mutation1 | ||
| 151 | If the event is a KeyboardEvent or a MouseEvent and the modifiers attribute is specified and any item from getModifierState() method of the event is not accounted for by the modifiers attribute or one of the values made the filter fail, then the handler is not fired. | The filter matches if all the modifiers that returned true are accounted for, and none of the values made the filter fail. If any of them fail to match the event, then the invocation must not do anything else.http://www.w3.org/TR/xbl/#modifiers2 |
See http://www.w3.org/TR/xbl/#modifiers for details on what modifiers are accounted for and which ones make the filter fail | |
| 152 | A UI event originating from a shadow tree node passes through ancestors in the next highest shadow scope with target set to the bound element that contains that shadow tree. | Whenever events originating from a shadow tree flow from a shadow element in that shadow tree to the bound element, one of two actions occurs. Either the event is retargeted so that the bound element becomes the target, or the event is stopped and flow proceeds to the next phase. Whenever an event is retargeted, the event is cloned, with the clone's target field set to the bound element...The action taken (retarget vs. stop) is specific to the event type. In general, UI events must be retargeted and mutation events must be stopped. The target node, when the event is passing through a node at a higher shadow scope than the event target, is always the bound element in whose shadow content the event target lies. http://www.w3.org/TR/xbl/#event13 focus/blur and mouseover/out events have a special case covered by assertions 163, 164, 168 |
||
| 153 | A mutation event originating from a shadow tree node does not pass through ancestors in a higher shadow scope. | Whenever events originating from a shadow tree flow from a shadow element in that shadow tree to the bound element, one of two actions occurs. Either the event is retargeted so that the bound element becomes the target, or the event is stopped and flow proceeds to the next phase. Whenever an event is retargeted, the event is cloned, with the clone's target field set to the bound element...The action taken (retarget vs. stop) is specific to the event type. In general, UI events must be retargeted and mutation events must be stopped. http://www.w3.org/TR/xbl/#event13 | ||
| 154 | An event originating from a shadow tree node passes through its bound element with target set to the bound element | The target node, when the event is passing through a node at a higher shadow scope than the event target, is always the bound element in whose shadow content the event target lies The bound element itself is in the shadow scope of the content around it.http://www.w3.org/TR/xbl/#event13 |
||
| 155 | An event originating from a shadow tree node passes through its bound element only in the target phase. | When an event is retargetted at a bound element, the bound element's event handlers must see the event only in the target phase. http://www.w3.org/TR/xbl/#event13 | ||
| 156 | An event originating from a shadow tree node passes through the handlers element of the binding with target set to the target shadow tree node. | The timing of event retargeting is such that when the event is forwarded to the handlers element, the binding's handlers see the relevant shadow tree node as the target, rather than the bound element as the target.http://www.w3.org/TR/xbl/#event13 | ||
| 157 | An event fired on a bound element's explicit child bubbles into the element containing the content element the element was assigned to. | an event fired on a bound element's explicit child bubbles into the element containing the content element the element was assigned to.http://www.w3.org/TR/xbl/#event13 | ||
| 158 | Any method invocations on an event(stopPropogation(), preventDefault()) affect the event regardless of how many scopes it has crossed. | Any method invocations on any clones of the event object must also be forwarded to the original event and all the clones, so that attempts to stop propagation and cancel the default action affect the event regardless of how many scopes it has crossed.http://www.w3.org/TR/xbl/#event13 | ||
| 159 | If an event bubbles through or is targeted at one or more bound elements, and the event is not canceled after the capture, target, and bubble phases have all completed, then the event's eventPhase attribute is set to the value 2019716164, and then the event is be forwarded to the relevant handlers elements of all the bound elements the event bubbled through or was targeted at in those bubble and target phases, in reverse tree order (starting from the target node and walking the tree towards the Document node), with currentTarget set to the relevant bound element each time. | If an event bubbles through or is targeted at one or more bound elements, and the event is not canceled (after the capture, target, and bubble phases have all completed, its defaultPrevented attribute is still false), then the event's eventPhase attribute must be set to the value 0x78626C44 (2019716164), and then the event must be forwarded to the relevant handlers elements of all the bound elements the event bubbled through or was targeted at in those bubble and target phases, in reverse tree order (starting from the target node and walking the tree towards the Document node), with currentTarget set to the relevant bound element each time. | ||
| 160 | If an event bubbles through or is targeted at one or more bound elements, then the UA default action (if any) is performed only if the defaultPrevented attribute is false after the capture, target, bubble, and default phases. | If the event has a UA default action, it must only perform it if the defaultPrevented attribute is still false after it has been so forwarded.http://www.w3.org/TR/xbl/#the-default1 | ||
| 161 | The stopPropagation() method has no effect during the default phase on the handlers element. | The stopPropagation() and stopImmediatePropagation() methods must have no effect during this "default" phase.http://www.w3.org/TR/xbl/#the-default1 | ||
| 162 | If a default phase handler of the handlers element calls stopImmediatePropagation() it does not stop any other valid default phase handlers from firing. | The stopPropagation() and stopImmediatePropagation() methods must have no effect during this "default" phase.http://www.w3.org/TR/xbl/#the-default1 | ||
| 163 | If shadow content underneath a focusable bound element loses focus and shadow content also underneath the bound element takes focus, then the cooresponding focus, blur, DOMFocusIn, and DOMFocusOut events do not pass through ancestors in a higher shadow scope. | If shadow content underneath a focusable bound element loses focus and shadow content also underneath the bound element takes focus, then both focus change events must be stopped.http://www.w3.org/TR/xbl/#the-focus | ||
| 164 | If shadow content underneath a focusable bound element loses focus and shadow content also underneath the bound element takes focus, then the bound element retains focus throughout the two events. | As far as the bound element is concerned, it retains focus throughout the two events. http://www.w3.org/TR/xbl/#the-focus | ||
| 165 | The nav-index values used in one shadow scope are ignored by other shadow scopes. | The 'nav-index' values used in one shadow scope are ignored by other shadow scopes. http://www.w3.org/TR/xbl/#the-focus | ||
| 166 | The tab order specified by the nav-index attributes of shadow tree nodes of the shadow tree is used in place of the tab order of the bound element in the bound element's tree. | Each shadow scope has a unique tab order. ... The tab order is resolved in the shadow tree first to produce a list of elements in the tab order. This list is substituted in place of the bound element in the bound element's tree tab order. http://www.w3.org/TR/xbl/#the-focus | ||
| 167 | The :focus psuedo-element applies to every shadow node in the shadow scope chain from the original target of the focus event to the bound element in the highest shadow scope. | Because content in multiple shadow scopes can be focused, the CSS :focus pseudo-element is hierarchical in the presence of XBL, with up to one element in each shadow scope matching the pseudo-class. http://www.w3.org/TR/xbl/#the-focus | ||
| 168 | If the mouse moves out of an element in the shadow tree onto an another element also underneath the bound element, then the cooresponding mouseover and mouseout events do not pass through ancestors in a higher shadow scope. | If, however, the user has simply moved the pointing device from one element in the shadow tree to another element in the same shadow tree, without entering or exiting the bound element itself, then the event must be stopped http://www.w3.org/TR/xbl/#the-mouseover |
Attachment/Detachment
| Id | Assertion | Spec Reference | Comments | Tests |
| 169 | An element is bound after the binding document is loaded, the binding is known to apply to the element, and the element has been created. | Bindings must be attached as soon as the following conditions have all been met:...it is known that the binding applies to the element,...the DOM Element object for the element has been created, and...the binding document defining the binding has loaded. In particular, binding can happen before the element is inserted into its document. If the binding document was already loaded when the element was created, or when it became known that the element matched the binding (e.g. because the binding's element attribute is mutated in a script), then the binding must be applied such that to any running scripts, notwithstanding those implementing xblBindingAttached()' |
||
| 170 | If the mutation of an element causes a binding to apply, the mutation events associated with that mutation fire after the binding is applied. | When mutation events are to fire, they must fire after the binding being applied. | ||
| 171 | Bindings must be detached as soon as it is known that the binding no longer applies to the element | Bindings must be detached as soon as it is known that the binding no longer applies to the element...When it becomes known that a binding is to be detached, it must happen such that to any running scripts it appears that the binding was removed immediately, | ||
| 172 | If a script detaches a binding from within xblBindingAttached() or xblEnteredDocument(), or a handler for xbl-bound then the binding is detached after all these methods have been called | If a binding stops applying to a document while the above steps are being applied, the binding is not removed until after the steps above have all been completed. Once they have been completed, any bindings that no longer apply must be detached. 'assuming this is what the spec means, what is the motivating use case?' | ||
| 173 | The xbl-bindings-are-ready event is fired at the bound document's root if the bound document has finished loading, the bindings-are-ready counter is set to zero, all bindings have been applied to the bound document, and no scripts are running. | If the bound document is being parsed by the user agent, then, as soon as all the following conditions have been met, the user agent must fire an xbl-bindings-are-ready event on the document's root element. The conditions are: the document has finished parsing...the bindings-are-ready counter is at zero...all bindings that are known to apply to elements have been completely applied, and...no scripts are running. 'might be hard to pin down this state test-wise' | ||
| 174 | The xbl-bindings-are-ready event bubbles,is not cancelable, and does not have a default action | The event must use the Event interface, must bubble, must not be cancelable, and must not have a default action. | ||
| 175 | The bindings-are-ready attribute is initially zero. | Initially, the bindings-are-ready counter must be set to zero. | ||
| 176 | The bound document's xbl-bindings-are-ready event fires before the document's load event. | The bound document's load event must not fire until after the xbl-bindings-are-ready event has fired | ||
| 177 | The xbl-bindings-are-ready event fires even in the complete absence of any use of XBL in the document. | The xbl-bindings-are-ready event must fire even in the complete absence of any use of XBL in the document. | ||
| 178 | The xbl-bindings-are-ready event is only fired once per document load. | The xbl-bindings-are-ready event must only fire once per document load. | ||
| 179 | If an <?xbl> processing instruction occurs after the root element's start tag in the document, then it is ignored. | <?xbl?> processing instructions that occur after the root element's start tag in the markup are in error If a processing instruction is in error (as described in the previous few paragraphs) then it must be ignored. |
||
| 180 | If an <?xbl> processing instruction is inserted into the DOM after the start tag has been parsed or the root element has been attached to the document, then it is ignored. | PIs that are dynamically inserted through the DOM after the root element's start tag has been parsed or the root element has been attached to the document are in error too. If a processing instruction is in error (as described in the previous few paragraphs) then it must be ignored. |
||
| 181 | If an <?xbl> processing instruction has a parsing error, it is ignored. | If there are any parse errors, then the entire processing instruction is in error. If a processing instruction is in error (as described in the previous few paragraphs) then it must be ignored. |
||
| 182 | If the href pseudo-attribute of <?xbl> cannot be resolved, or returns an error, or does not point to a resource with an XML MIME type, or has any other problem that makes it unusable then it is ignored. | If the URI cannot be resolved, or returns an error, or does not point to a resource with an XML MIME type, or has any other problem that makes it unusable, then the processing instruction is in error. If a processing instruction is in error (as described in the previous few paragraphs) then it must be ignored. |
||
| 183 | If the href pseudo-attribute of <?xbl> is specified and it is valid, then the document refrenced by href is loaded unless it has already been loaded *. Any bindings defined by that document are applied to matching elements in the document that contained the PI. | Otherwise, the referenced document must be loaded (unless it has already been loaded), and any bindings defined by that document must be applied to matching elements in the document that contained the PI ''unless it has already been loaded' specified by: http://www.w3.org/TR/xbl/#binding5' | ||
| 184 | After a document is loaded from a <?xbl>, the document is in the bindingDocuments list of the document with the PI. | Once loaded, the binding document is added to the bindingDocuments list of the document with the PI. 'another assertion may cover this' | ||
| 185 | An imported binding document is live. | An imported binding document is live...For example, if new binding elements are added to an imported binding document (via the DOM), then the new bindings are immediately applied to the document that had the PI importing that binding document. 'another assertion may cover this' | ||
| 186 | An xbl binding applies to the document in which it is defined | XBL bindings are always implicitly imported into the document in which they are defined. | ||
| 187 | When a document is loading from an <?xbl?>, the document's bindings-are-ready counter is increased by one. | Whenever an <?xbl?> PI causes a binding document to be loaded, the document's' | ||
| 188 | When a document has finished loading from an <?xbl?>, the document's bindings-are-ready counter is decreased by one. | Once the binding document is loaded, the counter must be decreased by one. | ||
| 189 | If a file imports some bindings and the file containing those bindings has its own <?xbl?> processing instructions, that second PI only affects nodes in the binding document, not the original document. | If a file imports some bindings and the file containing those bindings has its own <?xbl?> processing instructions, that second PI only affects nodes in the binding document, not the original document. | ||
| 190 | A binding attached through the CSS binding property only remains on the bound element as long as the element continues to match the style rule. | Bindings attached through CSS must only remain on the bound element as long as the element continues to match the style rule. | ||
| 191 | If at any time a resolution of style on the element determines that a different binding should be attached, the old binding (and all bindings that it explicitly extends in its explicit inheritance chain) is detached. | If at any time a resolution of style on the element determines that a different binding should be attached, the old binding (and all bindings that it explicitly extends in its explicit inheritance chain) must be detached. | ||
| 192 | Whenever an element is removed from a document, any bindings attached to that element via CSS are detached. | Whenever an element is removed from a document, any bindings attached to that element via CSS must be detached. | ||
| 193 | Attaching a binding using CSS binding does not import the binding document. | Attaching a binding using CSS does not import the binding document. The element attributes of binding elements in the binding document do not take effect unless the binding document is imported. | ||
| 194 | Attaching using CSS binding does not affect the bindings-are-ready counter. | Attaching using CSS does not affect the bindings-are-ready counter. | ||
| 195 | If the value of the CSS binding property is none, then no bindings are applied by CSS to an element matching the style rule. | No bindings are to be attached through CSS. | ||
| 196 | If the value of the CSS binding property is one or more URIs then the binding associated with each uri is attached, a binding earlier in the list is applied before a uri later in the list and a uri later in the list implicitly inherits from a binding later in the list. | The specified binding is attached. More than one binding can be specified, resulting in the bindings being attached in the specified order, with the last binding implicitly inheriting from the previous one, and so forth, up to the first binding. | ||
| 197 | When a binding is attached using the addBinding method, it inherits from the current most derived binding that is already attached to the element. | When a binding is attached using the DOM, it inherits from the current most derived binding that is already attached to the element 'not really a testable assertion by itself' | ||
| 198 | Any bindings attached to an element using the addBinding() method will remain on the element until the element is destroyed or a corresponding removeBinding() call is made. | Any bindings attached to an element using the addBinding() method will remain on the element until the element is destroyed or a corresponding removeBinding() call is made. | ||
| 199 | Attaching a binding using the addBinding() method does not import the binding document. | Attaching a binding using the addBinding() DOM APIs does not import the binding document | ||
| 200 | Attaching using the addBinding() method does not affect the bindings-are-ready counter. | Attaching using the addBinding() API does not affect the bindings-are-ready counter. | ||
| 201 | If a binding has an extends attribute, then the binding it references is attached first | If the binding has an extends attribute, then the user agent must immediately consider the binding that the attributes references (if any) to apply to the bound element as well, and must attach that binding first, recursively applying these steps to that binding 'how can we test without using xblBindingAttached? - shadow tree generation, handlers, or implementation perhaps?' | ||
| 202 | if a binding directly or indirectly derives from itself through a chain of one or more extends attributes — each binding in the chain applies only once | if a binding directly or indirectly derives from itself through a chain of one or more extends attributes — then the user agent must only apply each binding in the chain once | ||
| 203 | When an attachment causes other binding attachments, the order that bindings on different bound elements have xblEnteredDocument() and xblBindingAttached() called is the relative tree order of all their bound elements, as returned by the compareDocumentPosition() function | The order that bindings on different bound elements have these methods called must be the relative tree order of all their bound elements, as returned by the compareDocumentPosition() function 'assertion could use better wording' | ||
| 204 | When an attachment causes other binding attachments, The order that bindings on the same bound element have xblBindingAttached and xblEnteredDocument called is the derivation order, with less derived bindings being initialized before more derived bindings. | The order that bindings on the same bound element have these methods called must be the derivation order, with less derived bindings being initialized before more derived bindings. | ||
| 205 | After attachment and the xblBindingAttached() and xblEnteredDocument() methods are called, an xbl-bound event is fired on bound element that just got bound, in the same order as their xblBindingAttached() methods were invoked. | After all the appropriate methods have been called, an xbl-bound event that bubbles, is not cancelable, has no default action, and uses the Event interface, must be fired on every bound element that just got bound, in the same order as their xblBindingAttached() methods were invoked. | ||
| 206 | The xbl-bound event bubbles. | an xbl-bound event that bubbles, is not cancelable, has no default action, | ||
| 207 | The xbl-bound event is not cancelable. | an xbl-bound event that bubbles, is not cancelable, has no default action | ||
| 208 | The xbl-bound event has no default action. | an xbl-bound event that bubbles, is not cancelable, has no default action | ||
| 209 | ' If a binding stops applying to a document while a binding is being attached, the binding is not removed until after attachment has been completed. Once it is completed, any bindings that no longer apply are detached. | If a binding stops applying to a document while the above steps are being applied, the binding is not removed until after the steps above have all been completed. Once they have been completed, any bindings that no longer apply must be detached. | ||
| 210 | If the xblEnteredDocument() and xblLeftDocument() methods are invoked due to a mutation, these methods are invoked after any associated mutation events fire. | These methods must be invoked as soon as the DOM is in a stable state, after any mutation events have fired | ||
| 211 | The xblEnteredDocument() and xblLeftDocument() methods are not invoked if a bound element is both removed then re-inserted into the document during the same script execution. | If a bound element is removed and then reinserted into a document (or vice versa) during script execution, or while mutation events are being fired, the user agent must coalesce all the notifications into zero or one method calls. | ||
| 212 | The bound document does not fire its load event until all XBL dependencies have loaded | The bound document must wait until all XBL dependencies have loaded before firing its load event. 'what does this imply exactly and how could we test this?' | ||
| 213 | When a binding is added and the relevant binding document is not yet loaded, the load is started in the background and the binding only attached once the binding document is available | when a binding is added (either via style sheet, script, or some other method), and the relevant binding document is not yet loaded, the load must be started in the background and the binding only attached once the binding document is available | ||
| 214 | When a binding is detached, the xblLeftDocument() method is invoked. | When a binding is detached, the xblLeftDocument() method must be invoked on the binding's implementation | ||
| 215 | When a binding is detached, its shadow tree is removed. | Then, the shadow tree must be removed 'an assertion may already cover this' | ||
| 216 | When a binding is detached, its implementation is removed from the xblImplementations list of the bound element. | the implementation must be removed from the bound element's list of binding implementations 'an assertion may already cover this' | ||
| 217 | When a binding is detached, any forwarding of events to the binding is stopped for this bound element. | and any forwarding of events to the binding must be stopped for this bound element. | ||
| 218 | When a binding is detached, if it had an extends attribute when it was bound to the element, then the binding attached due to that attribute is detached. | If the binding had an extends attribute when it was bound to the element (it may have changed since then, in which case the binding is being detached precisely for that reason), then the user agent must then detach the binding that was attached because of that attribute (if any). | ||
| 219 | When a binding is detached, if the binding had a shadow tree, the explicit children of the bound element are redistributed. | If the binding had a shadow tree, the explicit children must then be redistributed. (See: processing content elements.) 'an assertion might already cover this' |
DOM
| Id | Assertion | Spec Reference | Comments | Tests |
| 220 | The bindingDocuments attribute returns a NamedNodeMap of all the binding documents loaded by the document. | The bindingDocuments attribute must return a NamedNodeMap of all the binding documents loaded by the document. Documents are referenced using their URIs as the node names, with null namespaces. | ||
| 221 | The value returned by bindingDocuments is a live NamedNodeMap. | The NamedNodeMap must be live 'expand on 'live', needs better assertion' | ||
| 222 | Any attempt to modify the bindingDocuments attribute raises a NO_MODIFICATION_ALLOWED_ERR | and must raise NO_MODIFICATION_ALLOWED_ERR on any attempts at modification or deletion. | ||
| 223 | The loadBindingDocument method synchronously loads the specified binding document and any binding documents required by that document by explicit inheritance and applies any appropriate bindings to the document implementing the loadBindingDocument method. | The loadBindingDocument method must synchronously load the specified binding document (unless it has already been loaded), as well as any binding documents that are required by that binding document due to explicit inheritance, and any bindings defined by that document must be applied to matching elements in the document that corresponds to this DocumentXBL object. | ||
| 224 | If the loadBindingDocument method is successful, it returns the binding document's Document object. | The method must then return the binding document's Document object. | ||
| 225 | If the loadBindingDocument method fails, it returns null. | If the load fails, this method must return null. | ||
| 226 | The addBinding method attaches the specified binding to the element the method was called on. | The addBinding method must attach the specified binding (and any bindings that the binding inherits from) to the element. This call is not necessarily synchronous. The binding may not be attached yet when the call completes. 'not synchronous, how could we test this?' | ||
| 227 | Calling the addBinding method on a node that is not an element raises a HIERARCHY_REQUEST_ERR | This exception must be raised if the node is not an element. | ||
| 228 | The removeBinding method detaches the specified binding (and any bindings that the binding inherits from explicitly using the extends attribute) from the element it was called on. | The removeBinding method must detach the specified binding (and any bindings that the binding inherits from explicitly using the extends attribute) from the element | ||
| 229 | If the removeBinding specifies a binding that was not bound with addBinding, then removeBinding does nothing. | This method can only detach bindings that were attached using addBinding. If the binding in question is not attached to this element (or was attached through another attachment mechanism) then the method must do nothing. | ||
| 230 | The hasBinding method returns true if the specified URI matches the URI of a binding applied to the element, and returns false otherwise. | The hasBinding method must check the bindings applied to the element and compares each binding's URI with the parameter passed. If any of the bindings matches the specified URI, then the method must return true, otherwise it must return false. | ||
| 231 | Shadow content is not accessible via the childNodes list for the bound element. | The shadow content is not accessible via the childNodes list for the bound element | http://fayearthur.com/files/test_231.xhtml | |
| 232 | Shadow content is not accessible using firstChild or nextSibling to iterate over the children of the bound element. | nor is it accessible using firstChild/nextSibling to iterate over the children of the bound element | ||
| 233 | DOM methods that can be invoked on elements will only see nodes that are in the same shadow scope. | DOM methods that can be invoked on elements (e.g., getElementsByTagName()) will only see nodes that are in the same shadow scope | ||
| 234 | Methods invoked on the document only see nodes that are not in shadow trees. | Methods invoked on the document (e.g., getElementById) only see nodes that are not in shadow trees. | ||
| 235 | Ids need to be unique within each shadow scope. | Elements in different shadow scopes may have clashing IDs. IDs need only be unique within each shadow scope. | ||
| 236 | Inserting the root of a shadow tree into a document raises a HIERARCHY_REQUEST_ERR. | Elements that are the root of a shadow tree (the cloned template elements) cannot be inserted into a document. Any attempt to do so must raise a HIERARCHY_REQUEST_ERR. | ||
| 237 | Mutating the DOM of the template causes the final flattened tree on bound elements to be immediately updated. | Manipulating the DOM of a shadow tree (content elements being moved about or even removed altogether, xbl:attr attributes being attached and modified, etc) must immediately cause the final flattened tree to be updated. | ||
| 238 | Mutating the shadow tree of a bound element does not effect any other shadow trees. | Because each bound element gets its own copy of the cloned template, changes to a bound element's shadow content only affect that bound element. Other bindings are unaffected. | ||
| 239 | If an element is added to the DOM dynamically, its shadow scope is that of its parent element. | If an element is added to the DOM dynamically, its shadow scope is that of its parent element. 'more of a definition?' | ||
| 240 | Adding an element as a child of a bound element causes that element to be assigned to an appropriate content element. | Adding an element as a child of a bound element causes that element to be assigned to an appropriate content element 'another assertion may cover this' | ||
| 241 | The xblChildNodes attribute of a content element returns a NodeList containing a live list of all the nodes that are currently assigned to the content element. | The xblChildNodes attribute must return a NodeList containing a live list of all the nodes that are currently assigned to the content element. | ||
| 242 | If a content element is not in a shadow tree, the xblChildNodes attribute returns null. | if the content element is not in a shadow tree, then this attribute must return null. | ||
| 243 | If the setInsertionPoint method of a content element is called with a parameter that is not the child of the bound element, then a HIERARCHY_REQUEST_ERR exception is raised. | The user agent must then check that the parent of child is in fact e. If it is not, then the method must raise an HIERARCHY_REQUEST_ERR exception. | ||
| 244 | If the setInsertionPoint method is called on a content element with no bound element, an INVALID_STATE_ERR exception is raised. | If there is no such bound element (e.g. the content element has been removed from its shadow tree), then the method must raise an INVALID_STATE_ERR exception. | ||
| 245 | If the setInsertionPoint method is called on a content element and the element's includes attribute as a selector does not match the argument to setInsertionPoint, then an TYPE_MISMATCH_ERR is raised. | If the attribute is present but the element does not match the selector it specifies (or if the selector is not syntactically correct), then the method must raise an TYPE_MISMATCH_ERR exception. | ||
| 246 | If the setInsertionPoint method is called on a content element and the element has no includes attribute or the argument to setInsertionPoint is an element that matches the selector specified by the value of includes, then the argument element is assigned to that content element, and unassigned from any content element it was previously assigned to. | Finally, the user agent must assign child to the content element, instead of whatever previous content element it was assigned to, if any. | ||
| 247 | If a node is assigned, using the setInsertionPoint method, to a content element that is not locked, then the element will only remain there until such time as the user agent redistributes the bound element's explicit children. | If a node is assigned, using the setInsertionPoint method, to a content element that is not locked, then the element will only remain there until such time as the user agent redistributes the bound element's explicit children. 'covered by another assertion, but good to have explicit testcase for this' | ||
| 248 | The order of nodes assigned to a content element is always be the same as the relative order of those nodes in the original core DOM. | The order of nodes assigned to a content element is always be the same as the relative order of those nodes in the original core DOM. 'might be covered by another assertion' | ||
| 249 | The getElementById method of a template element returns an Element that has an ID attribute with the specified value and is a descendant of the template element. | This method must return an Element that has an ID attribute with the given value, and that is a descendant of the template element on which it is invoked | ||
| 250 | If the getElementById method is called on a template element and there is no descendant of the template element that has the specified id, then null is returned. | If no such element exists, this returns null. | ||
| 251 | The trusted attribute of an event is true if the user agent dispatched the event. | The trusted attribute must return true if the user agent dispatched the event (e.g. in response to user action) | ||
| 252 | The trusted attribute of an event is false if the user agent did not dispatch the event. | and false otherwise (e.g. if an author script dispatched a synthetic event). | ||
| 253 | The trusted attributre of an event fired by the user agent in response to an untrusted event is false. | Events fired by the user agent in response to untrusted events must themselves be untrusted. |
Resources
| Id | Assertion | Spec Reference | Comments | Tests |
| 254 | Nested documents and images with bindings do not share a reference to the same binding document. | Such sharing of binding documents must be limited to binding documents loaded by a document, its binding documents, its scripts, and its style sheets. Nested documents and images do not share binding documents with each other or with their container document. | ||
| 255 | If a script or implementation object specifies a src attribute, the contents of that element are ignored. | In the case of script and implementation elements, if a src attribute is present then the contents of the element must be ignored (even if fetching the specified URI fails). | ||
| 256 | All descendant elements of script, implementation, or handler elements are processed before the XBL script block itself is executed. | All descendant elements must be processed, though, according to their semantics, before the XBL script block itself is executed. | ||
| 257 | If an implementation element specifies a src attribute, the resource specified by the attribute is fetched and the attachment of that binding blocks until the script has been fetched and executed. | For implementation elements, while the external script is being fetched, the attachment of that binding must block. | ||
| 258 | If a script specified by the src attribute on a script or implementation has a Content-Type other than the type specified on the xbl element's script-type attribute or the default, then it is ignored. | For implementation elements, while the external script is being fetched, the attachment of that binding must block 'an assertion may already cover this' | ||
| 259 | Script in a binding is executed in the context of the global scope of the document specified by the script element's ownerDocument attribute. | Script must always be executed in the context of the global script scope of the document specified by the script's element's ownerDocument DOM attribute. This implies that scripts from different bindings in the same binding document bound to different elements in the same bound document share the same scripting scope. If the bindings were defined in the document itself, then the scope is the same scope as for that document. | ||
| 260 | A binding document inherits the security context of the document to which it is bound, not the security context of the domain from which it was fetched. | A binding document must inherit the security context of the document to which it is bound, not the security context of the domain from which it was fetched. 'needs better assertion' | ||
| 261 | In binding documents, the location and history properties of the Window object, and the location and cookie properties of the DocumentWindow object return nullIn binding documents, the location and history properties of the Window object, and the location and cookie properties of the DocumentWindow object, must return null | In binding documents, the location and history properties of the Window object, and the location and cookie properties of the DocumentWindow object, must return null, and any methods that are defined in terms of the browsing context's session history must do nothing 'unless the binding document is the bound document?' | ||
| 262 | If a style element's src attribute is present, then the contents of the element are ignored. | If a style element's src attribute is present, the contents of the element must be ignored (even if fetching the specified URI failed) | ||
| 263 | If a style element's src attribute is not specified, then the element's contents are applied to the bindings. | XBL style elements describe the style sheets that apply to bindings...Otherwise, it is the element's contents that give the style sheet. 'maybe another part covers this, inferring too much from spec' | ||
| 264 | All descendant elements of the style are processed according to their semantics, before the XBL style block itself is parsed. | All descendant elements must be processed, though, according to their semantics, before the XBL style block itself is parsed. | ||
| 265 | For non-XML styling languages, if the content of the style is inline, UAs must concatenate all the textual contents of text and CDATA child nodes, and the UA must ignore any other, non-text nodes (such as elements and comments) along with all their children. | For non-XML styling languages, if the content is inline, UAs must concatenate all the textual contents of text and CDATA child nodes, and the UA must ignore any other, non-text nodes (such as elements and comments) along with all their children | ||
| 266 | A style element labeled as containing a style sheet in a non-XML language yet containing element nodes is ignored. | A style element labeled as containing a style sheet in a non-XML language yet containing element nodes is in error. | ||
| 267 | The src attribute of a style element is only examined once all of the element's children have been processed (if any). | The src attribute must only be examined once all of the element's children have been processed (if any). | ||
| 268 | If the URI used to specify a binding contains a fragment identifier that is not a binding element in an xbl as an ancestor, then it is ignored and that binding is not attached. | If the URI contains a fragment identifier, then it must be processed as described in the relevant MIME type definition. The element targeted by the fragment identifier must be a binding element within an XBL subtree in the specified document When an attachment mechanism uses a URI that is in error (as per the last two paragraphs), then the user agent must act as if the attachment mechanism had not specified that binding. |
||
| 269 | If the URI used to specify a binding does not contain a fragment identifier and the URI points to an XBL document then the first binding element in the binding that is a child of the root xbl element is attached to the appropriate element. | If there is no fragment identifier and the URI points to an XBL document (not a non-XBL document) then the first binding element in the binding document that is a child of the root xbl element is selected. Otherwise, the URI does not point to a correct binding and is in error. Otherwise, the specified binding is attached to the element, as described for the relevant attachment mechanism. |
XBL Elements
| Id | Assertion | Spec Reference | Comments | Tests |
| 270 | If an xbl element is in an xbl document and it is not the root element, then it is ignored. | Expected contexts:..In an XBL document, none (this is the root element) When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 271 | If an xbl element is in a non-xbl document and it is the child of another element in the xbl namespace, then it is ignored. | Expected contexts:...In a non-XBL document, any non-XBL element whose specification allows the xbl element as a child. When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 272 | If an element in the xbl namespace other than binding or script is the child of an xbl element, then it is ignored. | Expected children (in any order):...binding: zero or more...script: zero or more...Any non-XBL element. When an XBL element has a child node that does not satisfy the "Expected children" list in its definition (for instance because it is the wrong node type, wrong element type, or because too many elements of its type preceded it), the child is in error |
||
| 273 | An xbl element with another xbl element as its ancestor is ignored. | UAs must consider any xbl elements that have another xbl element as an ancestor as being in error and must then ignore them, meaning those elements must never be considered to declare any bindings. | ||
| 274 | An element in the xbl namespace that does not have a correct xbl ancestor is ignored. | XBL elements (other than the xbl element itself) that do not have a correct xbl element as an ancestor are in error too, and UAs must ignore them. | ||
| 275 | If the style-type attribute is specified on an xbl element, and its value is a supported MIME type, then that is the styling language used by all bindings specified by that xbl element. | The style-type attribute specifies the MIME type of the styling language used by all bindings and XBL style blocks in the XBL subtree. The value must be a valid MIME type. | ||
| 276 | If the value of the style-type attribute of an xbl element is not specified, the styling language for all bindings of that xbl element is CSS. | If the attribute is not specified, the default language is CSS | ||
| 277 | If the value of the style-type attribute of an xbl element is not supported, then the bindings are still applied. | If the UA does not support the specified styling language (or has styling disabled), it must still apply bindings as appropriate. | ||
| 278 | If the value of the style-type attribute of an xbl element is not supported, then style blocks are ignored. | only style blocks must be ignored. | ||
| 279 | If the script-type attribute of an xbl element is specified and is a supported MIME type, then that is the scripting language used by all bindings and scripts in that xbl subtree. | The script-type attribute specifies the MIME type of the scripting language used by all bindings and XBL script blocks in the XBL subtree. The value must be a valid MIME type | ||
| 280 | If the value of the script-type attribute of an xbl element is not a supported language, then the bindings are still applied as appropriate | if the UA does not support the specified scripting language (or has scripting disabled), it must still apply bindings as appropriate | ||
| 281 | If scripting is disabled, bindings are still applied as appropriate. | if the UA does not support the specified scripting language (or has scripting disabled), it must still apply bindings as appropriate | ||
| 282 | If the value of the script-type attribute is not a supported language, then script, implementation, and handler blocks are ignored. | if the UA does not support the specified scripting language (or has scripting disabled)...only script, handler and implementation sections must be ignored. | ||
| 283 | If a binding element is not a child of an xbl element then it is ignored. | Expected context: xbl | ||
| 284 | If a binding element has a child in the xbl namespace other than implementation, template, handlers, or resources then the child is ignored. | Expected children (in any order): implementation: zero or one. template: zero or one. handlers: zero or one. resources: zero or one. Any non-XBL element | ||
| 285 | If the extends attribute does not refer to another binding, then the attribute is ignored. | If the URI is in error or does not refer to another binding, the UA must ignore it, meaning that this binding does not explicitly inherit from another binding. | ||
| 286 | If an element attribute is specified, it is interpreted as a selector and any elements (other than the binding's own shadow template elements) in the binding document, and in any documents that import the binding document, that match the given selector, are bound to the binding defined by this binding element. | This attribute, if specified, must contain a selector. All elements in the binding document, and in any documents that import the binding document, that match the given selector, must be bound to the binding defined by this binding element. (The element's own shadow tree, if any, must not be taken into account when determining if it matches a selector for the purposes of this attribute.) | ||
| 287 | If the element attribute of a binding contains an invalid selector, the attribute is ignored, and the binding is not attached to any element by its element attribute | If an element attribute contains an invalid selector, it is in error and must be ignored, meaning that while the binding is still parsed and may be referenced using other attachment mechanisms, the binding is not attached to any element by its element attribute, as if the attribute had simply been omitted. | ||
| 288 | If an implementation element is not the child of a binding element, then it is ignored. | Expected context:...binding | ||
| 289 | If the src attribute is specified on an implementation element, then the implementation element's contents are ignored. | The src attribute specifies the URI to a resource of the type given by the XBL subtree's script-type attribute. If the attribute is specified, the contents of the element must be ignored | ||
| 290 | If the src attribute specifies a resource that is unavailable then it is not used as an implementation definition for any binding. | if the implementation element points (using the src attribute) to a resource that is either unavailable...the UA must ignore it. In both cases, "ignoring it" means it must not be used as an implementation definition for any binding. | ||
| 291 | If the src attribute of an implementation element specifies a resource that is not of the type specified by the script-type attribute of the xbl element, then it is not used as an implementation definition for any binding. | or not of the type specified by the script-type attribute of the xbl element (or implied by its absence)...the UA must ignore it. In both cases, "ignoring it" means it must not be used as an implementation definition for any binding. | ||
| 292 | implementation blocks are evaluated once, on first use. | implementation blocks are evaluated once, on first use. | ||
| 293 | Any change to the implementation block has no effect after the element has been evaluated. | Changes to an implementation element or its contents have no effect once the element has been evaluated. | ||
| 294 | If the template element does not have a binding element as a parent, then it is ignored. | Expected context:...binding When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 295 | If the apply-author-sheets attribute of a template is not specified, or its value is not true, or false, then CSS rules from the bound document's author style sheets do not apply to shadow tree content. | The default behavior, which is used when the attribute is omitted or has a value other than the two allowed values, is to not apply the bound document's author style sheets (same as false) | ||
| 296 | If the apply-selectors-through attribute of a template is not trueor false or it is not specified, then CSS selectors do not cross shadow scopes. | The default behavior, which is used when the attribute is omitted or has a value other than the two allowed values, is to not let selectors cross scopes (same as false). | ||
| 297 | If a content element does not have a correct template element as an ancestor, then it is ignored. | Expected context:...there must be a correct template element somewhere in the ancestor chain When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 298 | If a content element has another content element in its ancestor chain, then the descendant content element is ignored. | Expected context:...there must not be any content elements anywhere in the ancestor chain. When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 299 | If the value of apply-binding-sheets of a content element is not true or if the attribute is not specified, then scoped style sheets loaded for this binding are not applied to explicit children assigned to this content element. | Its value must be either true (indicating that they are) or false (indicating that they are not). The default behavior, which is used when the attribute is omitted or has a value other than the two allowed values, is that they are not applied (same as false) | ||
| 300 | If the locked attribute of a content element is not specified or its value is not true, then new children can be inserted into this content element when it processed. | The default behavior, which is used when the attribute is omitted or has a value other than the two allowed values, is that they may be inserted (same as false) | ||
| 301 | Elements assigned to a content element whose locked attribute is dynamically changed are not removed from that element. | Elements already assigned to a content element whose locked attribute is dynamically changed are not removed from that element. | ||
| 302 | If an inherited element does not have a correct template element as an ancestor, then it is ignored. | Expected context:...Any, but there must be a correct template element somewhere in the ancestor chain. When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 303 | If an element with an xbl:attr does not have a correct template element as its ancestor, then the attribute is ignored. | Expected element:...Any, but there must be a correct template element somewhere in the ancestor chain. For cases where attributes on XBL elements do not conform to this specification or (for namespaced attributes) to another specification, and for cases where attributes in the XBL namespace are found on elements other than those listed as their "Expected element" in the definitions below, the error handling is similar: the attributes must be considered to be in error and the UA must ignore them, meaning that the presence of these non-conforming attributes in no way affects the XBL processing. |
||
| 304 | If an element with an xbl:pseudo attribute does not have a correct template element as an ancestor, then the attribute is ignored. | Expected element: Any, but there must be a correct template element somewhere in the ancestor chain. For cases where attributes on XBL elements do not conform to this specification or (for namespaced attributes) to another specification, and for cases where attributes in the XBL namespace are found on elements other than those listed as their "Expected element" in the definitions below, the error handling is similar: the attributes must be considered to be in error and the UA must ignore them, meaning that the presence of these non-conforming attributes in no way affects the XBL processing. |
||
| 305 | If a div element is not the child of a template, content, inherited, or div element, then it is ignored. | Expected contexts: template...content...inherited...div When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error....being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 306 | If a handlers element is not the child of a binding element, then it is ignored. | Expected context:...binding When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 307 | If a handlers element has a child that is not a handler element, then that child is ignored. | Expected children:...handler: zero or more. When an XBL element has a child node that does not satisfy the "Expected children" list in its definition (for instance because it is the wrong node type, wrong element type, or because too many elements of its type preceded it), the child is in error |
||
| 308 | If a handler is not a child of a handlers element, then it is ignored. | Expected context:...handlers When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 309 | If the event attribute is missing or its value is the empty string, it is in error | If the event attribute is missing or its value is the empty string, it is in error 'what does in error mean in this case?' | ||
| 310 | If the value of the phase attribute of a handler is capture, the event handler is only fired during the capturing phase of event propogation. | If capture is specified, then the event handler must only be fired during the capturing phase of event propagation 'possible duplicate' | ||
| 311 | If the value of the phase attribute of a handler is target, then the event handler only fires during the target phase. | If target is specified, then the event handler must only be fired during the target phase. | ||
| 312 | If the value of the phase attribute of a handler is default-action, the event handler is only fired during the default phase if it occurs. | If default-action is specified, then the event handler must only be fired during the default phase (if it occurs) | ||
| 313 | If the value of the phase attribute of a handler is not specified or its value is bubble, then the handler only fires during the bubble phase. | Otherwise, the handler must only be fired during the bubbling phase 'possible duplicate or contradiction with another part of spec' | ||
| 314 | If the trusted attribute of a handler is not specified or value of the trusted attribute is not true, then the value of the event's trusted flag does not affect the handler. | Otherwise, the value of the trusted flag does not affect the event handler. | ||
| 315 | The value of the propogate attribute of a handler has no effect if the phase attribute has the value default-action. | It has no effect if the phase attribute has the value default-action | ||
| 316 | If a handler element is in a language that is not supported by the script-type attribute on the xbl element(or the default, if this attribute is not specified), then it is ignored. | If a handler element is marked (via the script-type attribute of the xbl element) as being in a language that the UA does not support then the UA must ignore it | ||
| 317 | A change to a handler element takes effect the next time the event handler is fired. | handler blocks are evaluated each time they are fired. Changes to the handler elements therefore take effect the next time the event is fired. | ||
| 318 | If a resources element does not have a binding as a parent, then it is ignored. | Expected context:...binding When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 319 | If a resources element has a child other than a style or prefetch element, then the child is ignored. | Expected children (in any order):style: zero or more...prefetch: zero or more. When an XBL element has a child node that does not satisfy the "Expected children" list in its definition (for instance because it is the wrong node type, wrong element type, or because too many elements of its type preceded it), the child is in error |
||
| 320 | If a style element does not have a resources element as its parent, then it is ignored. | Expected context:...resources When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 321 | If the media attribute of a style element is not specified, then there is no restriction on which media the style sheet is applied to. | If this attribute is not specified, then there is no restriction on which media the style sheet should be applied to (same as specifying media="all") | ||
| 322 | The media attribute is interpreted as a Media Query. | How the value of this attribute is interpreted is defined by Media Queries | ||
| 323 | If the src attribute of a style element is specified, the contents of the element are ignored. | If the attribute is specified, the contents of the element must be ignored (even if the resource could not be fetched or was of the wrong type). | ||
| 324 | If the src attribute of a style element points to a resource that is unavailable, then that style element is not used to style anything. | Similarly, if the style element points (using the src attribute) to a resource that is either unavailable, or not of the type specified by the style-type attribute of the xbl element (or implied by its absence), then it is in error and the UA must ignore it. In both cases, "ignoring it" means it must not be used to style anything. | ||
| 325 | If the src attribute of a style element points to a resource that is not of the type specified by the style-type of the xbl element (or of the type "text/css" if it is not specified), then that style element is not used to style anything. | or not of the type specified by the style-type attribute of the xbl element (or implied by its absence), then it is in error and the UA must ignore it. In both cases, "ignoring it" means it must not be used to style anything. | ||
| 326 | If a prefetch element is the child of an element other than a resources element, then it is ignored. | Expected context:...resources When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 327 | If a script element is the child of something other than an xbl element, then it is ignored. | Expected context:...xbl When an XBL element is found inside an element other than those listed under the "Expected contexts" list in the definitions below, it is in error being in error means that the UA must, for the purposes of XBL evaluation, treat the XBL subtree as it would if the erroneous node and all its descendants were not present in the DOM. |
||
| 328 | If the src attribute is specified on a script element, then the contents of the element are ignored. | If the attribute is specified, the contents of the element must be ignored (even if the resource could not be fetched or was of the wrong type). | ||
| 329 | If the src attribute of a script element points to a resource that is unavailable, then that script block isn't executed. | if the script element points (using the src attribute) to a resource that is either unavailable, then it is in error and the UA must ignore it. In both cases, "ignoring it" means that the script must not be executed. | ||
| 330 | If the src attribute points to a resource that is not of the type specified by the script-type attribute of the xbl element, then the script is not executed. | or not of the type specified by the script-type attribute of the xbl element (or implied by its absence), then it is in error and the UA must ignore it. In both cases, "ignoring it" means that the script must not be executed. | ||
| 331 | A script element is evaluated once on first parse or first insertion into the document. | script blocks must be evaluated when their end-tag is parsed, or, for dynamically created elements, when they are first inserted into a document. This is the case whether or not the elements are in error | ||
| 332 | After a script block has been evaluated, any mutation of a script element's content or attributes is have no effect. | Once evaluation has started, a script block is dead and changes to its contents or attributes have no effect. | ||
| 333 | If the value of the id attribute of an xbl element is the empty string, then no ID is set on the element. | If the attribute's value is the empty string, the attribute must not set an ID | ||
| 334 | If the value of the id attribute of an xbl element is specified and is not the empty string, then it is used as one of the element's IDs. | Otherwise, the attribute's value must be treated as (one of) the element's ID(s). |