Selectors API support in Opera Presto 2.7

W3C reference
Selectors API Level 1

Opera Presto provides support for the Selectors API Level 1.

NodeSelector interface

The NodeSelector interface is implemented by objects implmenting the following interfaces:

Opera Presto's support is described in the following data table.

Method Description Support
  • This method must, when invoked, return the first matching Element
    node within the node's subtrees.
  • If there is no such node, the method must return null.
  • This method takes a selector string (selectors) as its argument.
  • This method must, when invoked, return a NodeList containing all of the
    matching Element nodes within the node's subtrees, in document order.
  • If there are no such nodes, the method must return an empty NodeList.
  • This method takes a selector string (selectors) as its argument.
  • The NodeList object returned by the querySelectorAll() method
    must be static, not live.


This is an example table written in HTML 4.01.

<table id="score">

In order to obtain the cells containing the results in the table, the following selector query may be used.

var cells = document.querySelectorAll("#score>tbody>tr>td:nth-of-type(2)");

This example returns a node list containing each of the cells in the second column. This could be useful, for example, to plot the values on a graph.

Selector API baseline tests

The Selector API baseline test case is composed of 1008 individual tests. Opera Presto registers a 100% pass rate when the test case is run. For your reference, the test case can be run here: W3C Baseline Tests: HTML with CSS Level 2.1 Selectors.


Opera Help

Need help? Hit F1 anytime while using Opera to access our online help files, or go here.