XPathExpression.webidl (1349B)
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. 5 */ 6 7 [Exposed=Window] 8 interface XPathExpression { 9 // The result specifies a specific result object which may be reused and 10 // returned by this method. If this is specified as null or it's not an 11 // XPathResult object, a new result object will be constructed and returned. 12 [Throws] 13 XPathResult evaluate(Node contextNode, 14 optional unsigned short type = 0 /* XPathResult.ANY_TYPE */, 15 optional object? result = null); 16 17 // The result specifies a specific result object which may be reused and 18 // returned by this method. If this is specified as null or it's not an 19 // XPathResult object, a new result object will be constructed and returned. 20 [Throws, ChromeOnly] 21 XPathResult evaluateWithContext(Node contextNode, 22 unsigned long contextPosition, 23 unsigned long contextSize, 24 optional unsigned short type = 0 /* XPathResult.ANY_TYPE */, 25 optional object? result = null); 26 };