| /* |
| This file is part of the WebKit open source project. |
| This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
| |
| This library is free software; you can redistribute it and/or |
| modify it under the terms of the GNU Library General Public |
| License as published by the Free Software Foundation; either |
| version 2 of the License, or (at your option) any later version. |
| |
| This library is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| Library General Public License for more details. |
| |
| You should have received a copy of the GNU Library General Public License |
| along with this library; see the file COPYING.LIB. If not, write to |
| the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| Boston, MA 02110-1301, USA. |
| */ |
| |
| #include "config.h" |
| #include "JSDocument.h" |
| |
| #include "Attr.h" |
| #include "CDATASection.h" |
| #include "CSSStyleDeclaration.h" |
| #include "Comment.h" |
| #include "DOMNamedFlowCollection.h" |
| #include "DOMSelection.h" |
| #include "DocumentAnimation.h" |
| #include "DocumentFragment.h" |
| #include "Element.h" |
| #include "Event.h" |
| #include "EventNames.h" |
| #include "ExceptionCode.h" |
| #include "HTMLCollection.h" |
| #include "JSAttr.h" |
| #include "JSCDATASection.h" |
| #include "JSCSSStyleDeclaration.h" |
| #include "JSComment.h" |
| #include "JSDOMBinding.h" |
| #include "JSDOMConstructor.h" |
| #include "JSDOMConvert.h" |
| #include "JSDOMImplementation.h" |
| #include "JSDOMSelection.h" |
| #include "JSDOMWindow.h" |
| #include "JSDocumentFragment.h" |
| #include "JSDocumentType.h" |
| #include "JSElement.h" |
| #include "JSEvent.h" |
| #include "JSEventListener.h" |
| #include "JSFontFaceSet.h" |
| #include "JSHTMLCollection.h" |
| #include "JSHTMLElement.h" |
| #include "JSHTMLHeadElement.h" |
| #include "JSHTMLScriptElement.h" |
| #include "JSLocation.h" |
| #include "JSNode.h" |
| #include "JSNodeFilter.h" |
| #include "JSNodeIterator.h" |
| #include "JSNodeList.h" |
| #include "JSProcessingInstruction.h" |
| #include "JSRange.h" |
| #include "JSSVGSVGElement.h" |
| #include "JSStyleSheetList.h" |
| #include "JSText.h" |
| #include "JSTreeWalker.h" |
| #include "JSWebAnimation.h" |
| #include "JSXPathExpression.h" |
| #include "JSXPathNSResolver.h" |
| #include "JSXPathResult.h" |
| #include "NameNodeList.h" |
| #include "Node.h" |
| #include "NodeIterator.h" |
| #include "NodeList.h" |
| #include "ProcessingInstruction.h" |
| #include "Range.h" |
| #include "SVGDocument.h" |
| #include "StyleProperties.h" |
| #include "Text.h" |
| #include "TreeWalker.h" |
| #include "URL.h" |
| #include "WebAnimation.h" |
| #include "XPathExpression.h" |
| #include "XPathNSResolver.h" |
| #include "XPathResult.h" |
| #include <runtime/Error.h> |
| #include <runtime/JSArray.h> |
| #include <runtime/JSString.h> |
| #include <runtime/ObjectConstructor.h> |
| #include <wtf/GetPtr.h> |
| |
| #if ENABLE(CSS_REGIONS) |
| #include "JSDOMNamedFlowCollection.h" |
| #endif |
| |
| #if ENABLE(WEB_ANIMATIONS) |
| #include "JSDocumentTimeline.h" |
| #endif |
| |
| using namespace JSC; |
| |
| namespace WebCore { |
| |
| // Functions |
| |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateElement(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateDocumentFragment(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTextNode(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateComment(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateCDATASection(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateProcessingInstruction(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateAttribute(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByTagName(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionImportNode(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateElementNS(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateAttributeNS(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByTagNameNS(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionAdoptNode(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateEvent(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateRange(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateNodeIterator(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTreeWalker(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetOverrideStyle(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateExpression(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateNSResolver(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionEvaluate(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandEnabled(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandIndeterm(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandState(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandSupported(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandValue(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByName(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionElementFromPoint(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCaretRangeFromPoint(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetSelection(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetCSSCanvasContext(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByClassName(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionHasFocus(JSC::ExecState*); |
| #if ENABLE(POINTER_LOCK) |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionExitPointerLock(JSC::ExecState*); |
| #endif |
| #if ENABLE(CSS_REGIONS) |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionWebkitGetNamedFlows(JSC::ExecState*); |
| #endif |
| #if ENABLE(WEB_ANIMATIONS) |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetAnimations(JSC::ExecState*); |
| #endif |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementById(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionPrepend(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionAppend(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQuerySelector(JSC::ExecState*); |
| JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQuerySelectorAll(JSC::ExecState*); |
| |
| // Attributes |
| |
| JSC::EncodedJSValue jsDocumentDoctype(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentImplementation(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentDocumentElement(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentInputEncoding(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentXMLEncoding(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentXMLVersion(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentXMLVersion(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentXMLStandalone(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentXMLStandalone(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentDocumentURI(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentDefaultView(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentStyleSheets(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentContentType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentTitle(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentTitle(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentDir(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentDir(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentDesignMode(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentDesignMode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentReferrer(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentDomain(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentDomain(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentURL(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentCookie(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentCookie(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentBody(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentBody(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentHead(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentImages(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentApplets(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentLinks(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentForms(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentAnchors(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentEmbeds(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentPlugins(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentScripts(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentLastModified(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentLocation(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentLocation(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentCharset(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentReadyState(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentCharacterSet(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentPreferredStylesheetSet(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentSelectedStylesheetSet(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentSelectedStylesheetSet(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentActiveElement(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentCompatMode(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| #if ENABLE(POINTER_LOCK) |
| JSC::EncodedJSValue jsDocumentPointerLockElement(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| #endif |
| JSC::EncodedJSValue jsDocumentFonts(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentVisibilityState(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentHidden(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentCurrentScript(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentOrigin(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentScrollingElement(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentOnbeforecopy(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnbeforecopy(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnbeforecut(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnbeforecut(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnbeforepaste(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnbeforepaste(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOncopy(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOncopy(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOncut(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOncut(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnpaste(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnpaste(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnselectstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnselectstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #if ENABLE(FULLSCREEN_API) |
| JSC::EncodedJSValue jsDocumentOnwebkitfullscreenchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitfullscreenchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(FULLSCREEN_API) |
| JSC::EncodedJSValue jsDocumentOnwebkitfullscreenerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitfullscreenerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| JSC::EncodedJSValue jsDocumentOnselectionchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnselectionchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnreadystatechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnreadystatechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #if ENABLE(CSP_NEXT) |
| JSC::EncodedJSValue jsDocumentOnsecuritypolicyviolation(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnsecuritypolicyviolation(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(POINTER_LOCK) |
| JSC::EncodedJSValue jsDocumentOnpointerlockchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnpointerlockchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(POINTER_LOCK) |
| JSC::EncodedJSValue jsDocumentOnpointerlockerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnpointerlockerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(WEB_ANIMATIONS) |
| JSC::EncodedJSValue jsDocumentTimeline(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| #endif |
| JSC::EncodedJSValue jsDocumentOnabort(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnabort(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #if ENABLE(REQUEST_AUTOCOMPLETE) |
| JSC::EncodedJSValue jsDocumentOnautocomplete(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnautocomplete(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(REQUEST_AUTOCOMPLETE) |
| JSC::EncodedJSValue jsDocumentOnautocompleteerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnautocompleteerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| JSC::EncodedJSValue jsDocumentOnblur(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnblur(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOncanplay(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOncanplay(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOncanplaythrough(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOncanplaythrough(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnclick(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnclick(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOncontextmenu(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOncontextmenu(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOncuechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOncuechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOndblclick(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOndblclick(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOndrag(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOndrag(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOndragend(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOndragend(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOndragenter(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOndragenter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOndragleave(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOndragleave(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOndragover(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOndragover(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOndragstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOndragstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOndrop(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOndrop(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOndurationchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOndurationchange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnemptied(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnemptied(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnended(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnended(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnerror(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnfocus(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnfocus(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOninput(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOninput(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOninvalid(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOninvalid(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnkeydown(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnkeydown(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnkeypress(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnkeypress(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnkeyup(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnkeyup(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnload(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnload(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnloadeddata(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnloadeddata(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnloadedmetadata(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnloadedmetadata(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnloadstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnloadstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnmousedown(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnmousedown(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnmouseenter(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnmouseenter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnmouseleave(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnmouseleave(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnmousemove(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnmousemove(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnmouseout(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnmouseout(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnmouseover(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnmouseover(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnmouseup(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnmouseup(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnmousewheel(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnmousewheel(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnpause(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnpause(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnplay(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnplay(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnplaying(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnplaying(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnprogress(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnprogress(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnratechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnratechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnreset(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnreset(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnresize(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnresize(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnscroll(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnscroll(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnseeked(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnseeked(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnseeking(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnseeking(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnselect(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnselect(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnstalled(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnstalled(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnsubmit(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnsubmit(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnsuspend(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnsuspend(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOntimeupdate(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOntimeupdate(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnvolumechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnvolumechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnwaiting(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwaiting(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnsearch(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnsearch(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| JSC::EncodedJSValue jsDocumentOnwheel(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwheel(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #if ENABLE(TOUCH_EVENTS) |
| JSC::EncodedJSValue jsDocumentOntouchcancel(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOntouchcancel(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(TOUCH_EVENTS) |
| JSC::EncodedJSValue jsDocumentOntouchend(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOntouchend(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(TOUCH_EVENTS) |
| JSC::EncodedJSValue jsDocumentOntouchmove(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOntouchmove(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(TOUCH_EVENTS) |
| JSC::EncodedJSValue jsDocumentOntouchstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOntouchstart(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(TOUCH_EVENTS) |
| JSC::EncodedJSValue jsDocumentOntouchforcechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOntouchforcechange(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| JSC::EncodedJSValue jsDocumentOnwebkitmouseforcechanged(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitmouseforcechanged(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| JSC::EncodedJSValue jsDocumentOnwebkitmouseforcedown(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitmouseforcedown(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| JSC::EncodedJSValue jsDocumentOnwebkitmouseforcewillbegin(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitmouseforcewillbegin(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| JSC::EncodedJSValue jsDocumentOnwebkitmouseforceup(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitmouseforceup(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| JSC::EncodedJSValue jsDocumentOnwebkitwillrevealbottom(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitwillrevealbottom(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| JSC::EncodedJSValue jsDocumentOnwebkitwillrevealleft(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitwillrevealleft(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| JSC::EncodedJSValue jsDocumentOnwebkitwillrevealright(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitwillrevealright(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| JSC::EncodedJSValue jsDocumentOnwebkitwillrevealtop(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentOnwebkitwillrevealtop(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| #endif |
| JSC::EncodedJSValue jsDocumentChildren(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentFirstElementChild(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentLastElementChild(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentChildElementCount(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentRootElement(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| JSC::EncodedJSValue jsDocumentConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); |
| bool setJSDocumentConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); |
| |
| class JSDocumentPrototype : public JSC::JSNonFinalObject { |
| public: |
| typedef JSC::JSNonFinalObject Base; |
| static JSDocumentPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) |
| { |
| JSDocumentPrototype* ptr = new (NotNull, JSC::allocateCell<JSDocumentPrototype>(vm.heap)) JSDocumentPrototype(vm, globalObject, structure); |
| ptr->finishCreation(vm); |
| return ptr; |
| } |
| |
| DECLARE_INFO; |
| static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
| { |
| return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
| } |
| |
| private: |
| JSDocumentPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| : JSC::JSNonFinalObject(vm, structure) |
| { |
| } |
| |
| void finishCreation(JSC::VM&); |
| }; |
| |
| typedef JSDOMConstructor<JSDocument> JSDocumentConstructor; |
| |
| /* Hash table */ |
| |
| static const struct CompactHashIndex JSDocumentTableIndex[2] = { |
| { 0, -1 }, |
| { -1, -1 }, |
| }; |
| |
| |
| static const HashTableValue JSDocumentTableValues[] = |
| { |
| { "location", DontDelete | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentLocation), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentLocation) } }, |
| }; |
| |
| static const HashTable JSDocumentTable = { 1, 1, true, JSDocumentTableValues, JSDocumentTableIndex }; |
| template<> EncodedJSValue JSC_HOST_CALL JSDocumentConstructor::construct(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| auto* castedThis = jsCast<JSDocumentConstructor*>(state->callee()); |
| ASSERT(castedThis); |
| ScriptExecutionContext* context = castedThis->scriptExecutionContext(); |
| if (UNLIKELY(!context)) |
| return throwConstructorScriptExecutionContextUnavailableError(*state, throwScope, "Document"); |
| auto object = Document::create(*context); |
| return JSValue::encode(toJSNewlyCreated(state, castedThis->globalObject(), WTFMove(object))); |
| } |
| |
| template<> JSValue JSDocumentConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject) |
| { |
| return JSNode::getConstructor(vm, &globalObject); |
| } |
| |
| template<> void JSDocumentConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) |
| { |
| putDirect(vm, vm.propertyNames->prototype, JSDocument::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); |
| putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Document"))), ReadOnly | DontEnum); |
| putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); |
| } |
| |
| template<> const ClassInfo JSDocumentConstructor::s_info = { "Document", &Base::s_info, 0, CREATE_METHOD_TABLE(JSDocumentConstructor) }; |
| |
| /* Hash table for prototype */ |
| |
| static const HashTableValue JSDocumentPrototypeTableValues[] = |
| { |
| { "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentConstructor) } }, |
| { "doctype", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentDoctype), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "implementation", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentImplementation), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "documentElement", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentDocumentElement), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "inputEncoding", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentInputEncoding), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "xmlEncoding", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentXMLEncoding), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "xmlVersion", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentXMLVersion), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentXMLVersion) } }, |
| { "xmlStandalone", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentXMLStandalone), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentXMLStandalone) } }, |
| { "documentURI", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentDocumentURI), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "defaultView", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentDefaultView), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "styleSheets", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentStyleSheets), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "contentType", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentContentType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "title", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentTitle), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentTitle) } }, |
| { "dir", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentDir), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentDir) } }, |
| { "designMode", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentDesignMode), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentDesignMode) } }, |
| { "referrer", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentReferrer), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "domain", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentDomain), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentDomain) } }, |
| { "URL", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentURL), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "cookie", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentCookie), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentCookie) } }, |
| { "body", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentBody), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentBody) } }, |
| { "head", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentHead), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "images", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentImages), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "applets", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentApplets), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "links", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentLinks), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "forms", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentForms), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "anchors", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentAnchors), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "embeds", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentEmbeds), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "plugins", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentPlugins), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "scripts", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentScripts), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "lastModified", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentLastModified), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "charset", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentCharset), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "readyState", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentReadyState), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "characterSet", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentCharacterSet), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "preferredStylesheetSet", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentPreferredStylesheetSet), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "selectedStylesheetSet", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentSelectedStylesheetSet), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentSelectedStylesheetSet) } }, |
| { "activeElement", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentActiveElement), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "compatMode", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentCompatMode), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| #if ENABLE(POINTER_LOCK) |
| { "pointerLockElement", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentPointerLockElement), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| { "fonts", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentFonts), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "visibilityState", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentVisibilityState), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "hidden", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentHidden), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "currentScript", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentCurrentScript), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "origin", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOrigin), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "scrollingElement", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentScrollingElement), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "onbeforecopy", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnbeforecopy), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnbeforecopy) } }, |
| { "onbeforecut", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnbeforecut), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnbeforecut) } }, |
| { "onbeforepaste", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnbeforepaste), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnbeforepaste) } }, |
| { "oncopy", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOncopy), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOncopy) } }, |
| { "oncut", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOncut), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOncut) } }, |
| { "onpaste", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnpaste), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnpaste) } }, |
| { "onselectstart", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnselectstart), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnselectstart) } }, |
| #if ENABLE(FULLSCREEN_API) |
| { "onwebkitfullscreenchange", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitfullscreenchange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitfullscreenchange) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(FULLSCREEN_API) |
| { "onwebkitfullscreenerror", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitfullscreenerror), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitfullscreenerror) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| { "onselectionchange", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnselectionchange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnselectionchange) } }, |
| { "onreadystatechange", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnreadystatechange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnreadystatechange) } }, |
| #if ENABLE(CSP_NEXT) |
| { "onsecuritypolicyviolation", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnsecuritypolicyviolation), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnsecuritypolicyviolation) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(POINTER_LOCK) |
| { "onpointerlockchange", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnpointerlockchange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnpointerlockchange) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(POINTER_LOCK) |
| { "onpointerlockerror", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnpointerlockerror), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnpointerlockerror) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(WEB_ANIMATIONS) |
| { "timeline", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentTimeline), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| { "onabort", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnabort), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnabort) } }, |
| #if ENABLE(REQUEST_AUTOCOMPLETE) |
| { "onautocomplete", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnautocomplete), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnautocomplete) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(REQUEST_AUTOCOMPLETE) |
| { "onautocompleteerror", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnautocompleteerror), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnautocompleteerror) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| { "onblur", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnblur), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnblur) } }, |
| { "oncanplay", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOncanplay), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOncanplay) } }, |
| { "oncanplaythrough", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOncanplaythrough), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOncanplaythrough) } }, |
| { "onchange", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnchange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnchange) } }, |
| { "onclick", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnclick), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnclick) } }, |
| { "oncontextmenu", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOncontextmenu), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOncontextmenu) } }, |
| { "oncuechange", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOncuechange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOncuechange) } }, |
| { "ondblclick", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOndblclick), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOndblclick) } }, |
| { "ondrag", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOndrag), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOndrag) } }, |
| { "ondragend", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOndragend), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOndragend) } }, |
| { "ondragenter", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOndragenter), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOndragenter) } }, |
| { "ondragleave", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOndragleave), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOndragleave) } }, |
| { "ondragover", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOndragover), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOndragover) } }, |
| { "ondragstart", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOndragstart), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOndragstart) } }, |
| { "ondrop", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOndrop), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOndrop) } }, |
| { "ondurationchange", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOndurationchange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOndurationchange) } }, |
| { "onemptied", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnemptied), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnemptied) } }, |
| { "onended", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnended), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnended) } }, |
| { "onerror", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnerror), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnerror) } }, |
| { "onfocus", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnfocus), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnfocus) } }, |
| { "oninput", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOninput), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOninput) } }, |
| { "oninvalid", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOninvalid), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOninvalid) } }, |
| { "onkeydown", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnkeydown), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnkeydown) } }, |
| { "onkeypress", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnkeypress), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnkeypress) } }, |
| { "onkeyup", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnkeyup), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnkeyup) } }, |
| { "onload", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnload), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnload) } }, |
| { "onloadeddata", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnloadeddata), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnloadeddata) } }, |
| { "onloadedmetadata", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnloadedmetadata), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnloadedmetadata) } }, |
| { "onloadstart", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnloadstart), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnloadstart) } }, |
| { "onmousedown", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnmousedown), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnmousedown) } }, |
| { "onmouseenter", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnmouseenter), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnmouseenter) } }, |
| { "onmouseleave", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnmouseleave), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnmouseleave) } }, |
| { "onmousemove", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnmousemove), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnmousemove) } }, |
| { "onmouseout", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnmouseout), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnmouseout) } }, |
| { "onmouseover", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnmouseover), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnmouseover) } }, |
| { "onmouseup", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnmouseup), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnmouseup) } }, |
| { "onmousewheel", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnmousewheel), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnmousewheel) } }, |
| { "onpause", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnpause), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnpause) } }, |
| { "onplay", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnplay), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnplay) } }, |
| { "onplaying", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnplaying), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnplaying) } }, |
| { "onprogress", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnprogress), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnprogress) } }, |
| { "onratechange", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnratechange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnratechange) } }, |
| { "onreset", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnreset), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnreset) } }, |
| { "onresize", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnresize), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnresize) } }, |
| { "onscroll", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnscroll), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnscroll) } }, |
| { "onseeked", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnseeked), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnseeked) } }, |
| { "onseeking", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnseeking), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnseeking) } }, |
| { "onselect", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnselect), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnselect) } }, |
| { "onstalled", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnstalled), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnstalled) } }, |
| { "onsubmit", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnsubmit), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnsubmit) } }, |
| { "onsuspend", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnsuspend), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnsuspend) } }, |
| { "ontimeupdate", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOntimeupdate), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOntimeupdate) } }, |
| { "onvolumechange", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnvolumechange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnvolumechange) } }, |
| { "onwaiting", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwaiting), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwaiting) } }, |
| { "onsearch", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnsearch), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnsearch) } }, |
| { "onwheel", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwheel), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwheel) } }, |
| #if ENABLE(TOUCH_EVENTS) |
| { "ontouchcancel", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOntouchcancel), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOntouchcancel) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(TOUCH_EVENTS) |
| { "ontouchend", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOntouchend), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOntouchend) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(TOUCH_EVENTS) |
| { "ontouchmove", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOntouchmove), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOntouchmove) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(TOUCH_EVENTS) |
| { "ontouchstart", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOntouchstart), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOntouchstart) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(TOUCH_EVENTS) |
| { "ontouchforcechange", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOntouchforcechange), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOntouchforcechange) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| { "onwebkitmouseforcechanged", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitmouseforcechanged), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitmouseforcechanged) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| { "onwebkitmouseforcedown", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitmouseforcedown), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitmouseforcedown) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| { "onwebkitmouseforcewillbegin", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitmouseforcewillbegin), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitmouseforcewillbegin) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| { "onwebkitmouseforceup", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitmouseforceup), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitmouseforceup) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| { "onwebkitwillrevealbottom", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitwillrevealbottom), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitwillrevealbottom) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| { "onwebkitwillrevealleft", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitwillrevealleft), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitwillrevealleft) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| { "onwebkitwillrevealright", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitwillrevealright), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitwillrevealright) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| { "onwebkitwillrevealtop", DontEnum | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentOnwebkitwillrevealtop), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDocumentOnwebkitwillrevealtop) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| { "children", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentChildren), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "firstElementChild", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentFirstElementChild), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "lastElementChild", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentLastElementChild), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "childElementCount", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentChildElementCount), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "rootElement", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDocumentRootElement), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, |
| { "createElement", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateElement), (intptr_t) (1) } }, |
| { "createDocumentFragment", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateDocumentFragment), (intptr_t) (0) } }, |
| { "createTextNode", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateTextNode), (intptr_t) (1) } }, |
| { "createComment", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateComment), (intptr_t) (1) } }, |
| { "createCDATASection", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateCDATASection), (intptr_t) (1) } }, |
| { "createProcessingInstruction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateProcessingInstruction), (intptr_t) (2) } }, |
| { "createAttribute", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateAttribute), (intptr_t) (1) } }, |
| { "getElementsByTagName", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementsByTagName), (intptr_t) (1) } }, |
| { "importNode", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionImportNode), (intptr_t) (1) } }, |
| { "createElementNS", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateElementNS), (intptr_t) (2) } }, |
| { "createAttributeNS", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateAttributeNS), (intptr_t) (2) } }, |
| { "getElementsByTagNameNS", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementsByTagNameNS), (intptr_t) (2) } }, |
| { "adoptNode", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionAdoptNode), (intptr_t) (1) } }, |
| { "createEvent", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateEvent), (intptr_t) (1) } }, |
| { "createRange", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateRange), (intptr_t) (0) } }, |
| { "createNodeIterator", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateNodeIterator), (intptr_t) (1) } }, |
| { "createTreeWalker", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateTreeWalker), (intptr_t) (1) } }, |
| { "getOverrideStyle", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetOverrideStyle), (intptr_t) (0) } }, |
| { "createExpression", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateExpression), (intptr_t) (0) } }, |
| { "createNSResolver", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateNSResolver), (intptr_t) (1) } }, |
| { "evaluate", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionEvaluate), (intptr_t) (0) } }, |
| { "execCommand", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionExecCommand), (intptr_t) (1) } }, |
| { "queryCommandEnabled", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandEnabled), (intptr_t) (1) } }, |
| { "queryCommandIndeterm", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandIndeterm), (intptr_t) (1) } }, |
| { "queryCommandState", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandState), (intptr_t) (1) } }, |
| { "queryCommandSupported", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandSupported), (intptr_t) (1) } }, |
| { "queryCommandValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandValue), (intptr_t) (1) } }, |
| { "getElementsByName", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementsByName), (intptr_t) (1) } }, |
| { "elementFromPoint", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionElementFromPoint), (intptr_t) (0) } }, |
| { "caretRangeFromPoint", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCaretRangeFromPoint), (intptr_t) (0) } }, |
| { "getSelection", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetSelection), (intptr_t) (0) } }, |
| { "getCSSCanvasContext", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetCSSCanvasContext), (intptr_t) (4) } }, |
| { "getElementsByClassName", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementsByClassName), (intptr_t) (1) } }, |
| { "hasFocus", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionHasFocus), (intptr_t) (0) } }, |
| #if ENABLE(POINTER_LOCK) |
| { "exitPointerLock", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionExitPointerLock), (intptr_t) (0) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(CSS_REGIONS) |
| { "webkitGetNamedFlows", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionWebkitGetNamedFlows), (intptr_t) (0) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| #if ENABLE(WEB_ANIMATIONS) |
| { "getAnimations", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetAnimations), (intptr_t) (0) } }, |
| #else |
| { 0, 0, NoIntrinsic, { 0, 0 } }, |
| #endif |
| { "getElementById", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementById), (intptr_t) (1) } }, |
| { "prepend", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionPrepend), (intptr_t) (0) } }, |
| { "append", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionAppend), (intptr_t) (0) } }, |
| { "querySelector", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQuerySelector), (intptr_t) (1) } }, |
| { "querySelectorAll", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQuerySelectorAll), (intptr_t) (1) } }, |
| }; |
| |
| const ClassInfo JSDocumentPrototype::s_info = { "DocumentPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSDocumentPrototype) }; |
| |
| void JSDocumentPrototype::finishCreation(VM& vm) |
| { |
| Base::finishCreation(vm); |
| reifyStaticProperties(vm, JSDocumentPrototypeTableValues, *this); |
| JSObject& unscopables = *constructEmptyObject(globalObject()->globalExec(), globalObject()->nullPrototypeObjectStructure()); |
| unscopables.putDirect(vm, Identifier::fromString(&vm, "prepend"), jsBoolean(true)); |
| unscopables.putDirect(vm, Identifier::fromString(&vm, "append"), jsBoolean(true)); |
| putDirectWithoutTransition(vm, vm.propertyNames->unscopablesSymbol, &unscopables, DontEnum | ReadOnly); |
| } |
| |
| const ClassInfo JSDocument::s_info = { "Document", &Base::s_info, &JSDocumentTable, CREATE_METHOD_TABLE(JSDocument) }; |
| |
| JSDocument::JSDocument(Structure* structure, JSDOMGlobalObject& globalObject, Ref<Document>&& impl) |
| : JSNode(structure, globalObject, WTFMove(impl)) |
| { |
| } |
| |
| JSObject* JSDocument::createPrototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return JSDocumentPrototype::create(vm, globalObject, JSDocumentPrototype::createStructure(vm, globalObject, JSNode::prototype(vm, globalObject))); |
| } |
| |
| JSObject* JSDocument::prototype(VM& vm, JSGlobalObject* globalObject) |
| { |
| return getDOMPrototype<JSDocument>(vm, globalObject); |
| } |
| |
| EncodedJSValue jsDocumentDoctype(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "doctype"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.doctype()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentImplementation(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "implementation"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.implementation()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentDocumentElement(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "documentElement"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.documentElement()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentInputEncoding(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "inputEncoding"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.characterSetWithUTF8Fallback()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentXMLEncoding(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "xmlEncoding"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringOrNull(state, impl.xmlEncoding()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentXMLVersion(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "xmlVersion"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringOrNull(state, impl.xmlVersion()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentXMLStandalone(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "xmlStandalone"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsBoolean(impl.xmlStandalone()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentDocumentURI(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "documentURI"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.urlForBindings()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentDefaultView(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "defaultView"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.defaultView()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentStyleSheets(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "styleSheets"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.styleSheets()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentContentType(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "contentType"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.contentType()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentTitle(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "title"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.title()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentDir(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "dir"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.dir()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentDesignMode(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "designMode"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.designMode()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentReferrer(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "referrer"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.referrer()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentDomain(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "domain"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.domain()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentURL(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "URL"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.urlForBindings()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentCookie(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "cookie"); |
| } |
| ExceptionCode ec = 0; |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.cookie(ec)); |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentBody(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "body"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.bodyOrFrameset()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentHead(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "head"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.head()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentImages(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "images"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.images()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentApplets(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "applets"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.applets()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentLinks(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "links"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.links()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentForms(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "forms"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.forms()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentAnchors(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "anchors"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.anchors()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentEmbeds(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "embeds"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.embeds()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentPlugins(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "plugins"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.plugins()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentScripts(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "scripts"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.scripts()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentLastModified(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "lastModified"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.lastModified()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentLocation(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "location"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.location()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentCharset(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "charset"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.characterSetWithUTF8Fallback()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentReadyState(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "readyState"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.readyState()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentCharacterSet(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "characterSet"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.characterSetWithUTF8Fallback()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentPreferredStylesheetSet(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "preferredStylesheetSet"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringOrNull(state, impl.preferredStylesheetSet()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentSelectedStylesheetSet(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "selectedStylesheetSet"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringOrNull(state, impl.selectedStylesheetSet()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentActiveElement(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "activeElement"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.activeElement()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentCompatMode(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "compatMode"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.compatMode()); |
| return JSValue::encode(result); |
| } |
| |
| |
| #if ENABLE(POINTER_LOCK) |
| EncodedJSValue jsDocumentPointerLockElement(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "pointerLockElement"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.pointerLockElement()); |
| return JSValue::encode(result); |
| } |
| |
| #endif |
| |
| EncodedJSValue jsDocumentFonts(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "fonts"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.fonts()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentVisibilityState(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "visibilityState"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.visibilityState()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentHidden(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "hidden"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsBoolean(impl.hidden()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentCurrentScript(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "currentScript"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.currentScript()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentOrigin(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "origin"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsStringWithCache(state, impl.origin()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentScrollingElement(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "scrollingElement"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.scrollingElement()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnbeforecopy(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onbeforecopy"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().beforecopyEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnbeforecut(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onbeforecut"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().beforecutEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnbeforepaste(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onbeforepaste"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().beforepasteEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOncopy(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "oncopy"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().copyEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOncut(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "oncut"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().cutEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnpaste(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onpaste"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().pasteEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnselectstart(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onselectstart"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().selectstartEvent)); |
| } |
| |
| |
| #if ENABLE(FULLSCREEN_API) |
| EncodedJSValue jsDocumentOnwebkitfullscreenchange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitfullscreenchange"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitfullscreenchangeEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(FULLSCREEN_API) |
| EncodedJSValue jsDocumentOnwebkitfullscreenerror(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitfullscreenerror"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitfullscreenerrorEvent)); |
| } |
| |
| #endif |
| |
| EncodedJSValue jsDocumentOnselectionchange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onselectionchange"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().selectionchangeEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnreadystatechange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return JSValue::encode(jsUndefined()); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().readystatechangeEvent)); |
| } |
| |
| |
| #if ENABLE(CSP_NEXT) |
| EncodedJSValue jsDocumentOnsecuritypolicyviolation(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onsecuritypolicyviolation"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().securitypolicyviolationEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(POINTER_LOCK) |
| EncodedJSValue jsDocumentOnpointerlockchange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onpointerlockchange"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().pointerlockchangeEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(POINTER_LOCK) |
| EncodedJSValue jsDocumentOnpointerlockerror(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onpointerlockerror"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().pointerlockerrorEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(WEB_ANIMATIONS) |
| EncodedJSValue jsDocumentTimeline(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "timeline"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), WebCore::DocumentAnimation::timeline(impl)); |
| return JSValue::encode(result); |
| } |
| |
| #endif |
| |
| EncodedJSValue jsDocumentOnabort(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onabort"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().abortEvent)); |
| } |
| |
| |
| #if ENABLE(REQUEST_AUTOCOMPLETE) |
| EncodedJSValue jsDocumentOnautocomplete(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onautocomplete"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().autocompleteEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(REQUEST_AUTOCOMPLETE) |
| EncodedJSValue jsDocumentOnautocompleteerror(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onautocompleteerror"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().autocompleteerrorEvent)); |
| } |
| |
| #endif |
| |
| EncodedJSValue jsDocumentOnblur(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onblur"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().blurEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOncanplay(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "oncanplay"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().canplayEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOncanplaythrough(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "oncanplaythrough"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().canplaythroughEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnchange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onchange"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().changeEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnclick(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onclick"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().clickEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOncontextmenu(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "oncontextmenu"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().contextmenuEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOncuechange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "oncuechange"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().cuechangeEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOndblclick(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ondblclick"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().dblclickEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOndrag(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ondrag"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().dragEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOndragend(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ondragend"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().dragendEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOndragenter(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ondragenter"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().dragenterEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOndragleave(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ondragleave"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().dragleaveEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOndragover(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ondragover"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().dragoverEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOndragstart(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ondragstart"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().dragstartEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOndrop(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ondrop"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().dropEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOndurationchange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ondurationchange"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().durationchangeEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnemptied(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onemptied"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().emptiedEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnended(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onended"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().endedEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnerror(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onerror"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().errorEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnfocus(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onfocus"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().focusEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOninput(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "oninput"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().inputEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOninvalid(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "oninvalid"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().invalidEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnkeydown(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onkeydown"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().keydownEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnkeypress(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onkeypress"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().keypressEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnkeyup(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onkeyup"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().keyupEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnload(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onload"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().loadEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnloadeddata(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onloadeddata"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().loadeddataEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnloadedmetadata(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onloadedmetadata"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().loadedmetadataEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnloadstart(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onloadstart"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().loadstartEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnmousedown(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onmousedown"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().mousedownEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnmouseenter(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return JSValue::encode(jsUndefined()); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().mouseenterEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnmouseleave(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return JSValue::encode(jsUndefined()); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().mouseleaveEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnmousemove(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onmousemove"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().mousemoveEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnmouseout(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onmouseout"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().mouseoutEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnmouseover(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onmouseover"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().mouseoverEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnmouseup(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onmouseup"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().mouseupEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnmousewheel(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onmousewheel"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().mousewheelEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnpause(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onpause"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().pauseEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnplay(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onplay"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().playEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnplaying(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onplaying"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().playingEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnprogress(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onprogress"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().progressEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnratechange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onratechange"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().ratechangeEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnreset(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onreset"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().resetEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnresize(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onresize"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().resizeEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnscroll(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onscroll"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().scrollEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnseeked(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onseeked"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().seekedEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnseeking(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onseeking"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().seekingEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnselect(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onselect"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().selectEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnstalled(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onstalled"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().stalledEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnsubmit(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onsubmit"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().submitEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnsuspend(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onsuspend"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().suspendEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOntimeupdate(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ontimeupdate"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().timeupdateEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnvolumechange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onvolumechange"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().volumechangeEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnwaiting(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwaiting"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().waitingEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnsearch(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onsearch"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().searchEvent)); |
| } |
| |
| |
| EncodedJSValue jsDocumentOnwheel(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwheel"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().wheelEvent)); |
| } |
| |
| |
| #if ENABLE(TOUCH_EVENTS) |
| EncodedJSValue jsDocumentOntouchcancel(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ontouchcancel"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().touchcancelEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(TOUCH_EVENTS) |
| EncodedJSValue jsDocumentOntouchend(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ontouchend"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().touchendEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(TOUCH_EVENTS) |
| EncodedJSValue jsDocumentOntouchmove(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ontouchmove"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().touchmoveEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(TOUCH_EVENTS) |
| EncodedJSValue jsDocumentOntouchstart(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ontouchstart"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().touchstartEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(TOUCH_EVENTS) |
| EncodedJSValue jsDocumentOntouchforcechange(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "ontouchforcechange"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().touchforcechangeEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| EncodedJSValue jsDocumentOnwebkitmouseforcechanged(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitmouseforcechanged"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitmouseforcechangedEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| EncodedJSValue jsDocumentOnwebkitmouseforcedown(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitmouseforcedown"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitmouseforcedownEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| EncodedJSValue jsDocumentOnwebkitmouseforcewillbegin(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitmouseforcewillbegin"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitmouseforcewillbeginEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| EncodedJSValue jsDocumentOnwebkitmouseforceup(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitmouseforceup"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitmouseforceupEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| EncodedJSValue jsDocumentOnwebkitwillrevealbottom(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitwillrevealbottom"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitwillrevealbottomEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| EncodedJSValue jsDocumentOnwebkitwillrevealleft(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitwillrevealleft"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitwillrevealleftEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| EncodedJSValue jsDocumentOnwebkitwillrevealright(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitwillrevealright"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitwillrevealrightEvent)); |
| } |
| |
| #endif |
| |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| EncodedJSValue jsDocumentOnwebkitwillrevealtop(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "onwebkitwillrevealtop"); |
| } |
| UNUSED_PARAM(state); |
| return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().webkitwillrevealtopEvent)); |
| } |
| |
| #endif |
| |
| EncodedJSValue jsDocumentChildren(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "children"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.children()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentFirstElementChild(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "firstElementChild"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.firstElementChild()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentLastElementChild(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "lastElementChild"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.lastElementChild()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentChildElementCount(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "childElementCount"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsNumber(impl.childElementCount()); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentRootElement(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| UNUSED_PARAM(thisValue); |
| JSValue decodedThisValue = JSValue::decode(thisValue); |
| auto* castedThis = jsDocumentCast(decodedThisValue); |
| if (UNLIKELY(!castedThis)) { |
| return throwGetterTypeError(*state, throwScope, "Document", "rootElement"); |
| } |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), WebCore::SVGDocument::rootElement(impl)); |
| return JSValue::encode(result); |
| } |
| |
| |
| EncodedJSValue jsDocumentConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| JSDocumentPrototype* domObject = jsDynamicCast<JSDocumentPrototype*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!domObject)) |
| return throwVMTypeError(state, throwScope); |
| return JSValue::encode(JSDocument::getConstructor(state->vm(), domObject->globalObject())); |
| } |
| |
| bool setJSDocumentConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| JSValue value = JSValue::decode(encodedValue); |
| JSDocumentPrototype* domObject = jsDynamicCast<JSDocumentPrototype*>(JSValue::decode(thisValue)); |
| if (UNLIKELY(!domObject)) { |
| throwVMTypeError(state, throwScope); |
| return false; |
| } |
| // Shadowing a built-in constructor |
| return domObject->putDirect(state->vm(), state->propertyNames().constructor, value); |
| } |
| |
| bool setJSDocumentXMLVersion(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "xmlVersion"); |
| } |
| auto& impl = castedThis->wrapped(); |
| ExceptionCode ec = 0; |
| auto nativeValue = valueToStringWithUndefinedOrNullCheck(state, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setXMLVersion(WTFMove(nativeValue), ec); |
| setDOMException(state, throwScope, ec); |
| return true; |
| } |
| |
| |
| bool setJSDocumentXMLStandalone(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "xmlStandalone"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toBoolean(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setXMLStandalone(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSDocumentTitle(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "title"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setTitle(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSDocumentDir(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "dir"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setDir(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSDocumentDesignMode(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "designMode"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = value.toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setDesignMode(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSDocumentDomain(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "domain"); |
| } |
| auto& impl = castedThis->wrapped(); |
| ExceptionCode ec = 0; |
| auto nativeValue = valueToUSVString(state, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setDomain(WTFMove(nativeValue), ec); |
| setDOMException(state, throwScope, ec); |
| return true; |
| } |
| |
| |
| bool setJSDocumentCookie(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "cookie"); |
| } |
| auto& impl = castedThis->wrapped(); |
| ExceptionCode ec = 0; |
| auto nativeValue = valueToUSVString(state, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setCookie(WTFMove(nativeValue), ec); |
| setDOMException(state, throwScope, ec); |
| return true; |
| } |
| |
| |
| bool setJSDocumentBody(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "body"); |
| } |
| auto& impl = castedThis->wrapped(); |
| ExceptionCode ec = 0; |
| HTMLElement* nativeValue = nullptr; |
| if (!value.isUndefinedOrNull()) { |
| nativeValue = JSHTMLElement::toWrapped(value); |
| if (UNLIKELY(!nativeValue)) { |
| throwAttributeTypeError(*state, throwScope, "Document", "body", "HTMLElement"); |
| return false; |
| } |
| } |
| impl.setBodyOrFrameset(WTFMove(nativeValue), ec); |
| setDOMException(state, throwScope, ec); |
| return true; |
| } |
| |
| |
| bool setJSDocumentLocation(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "location"); |
| } |
| RefPtr<Location> forwardedImpl = castedThis->wrapped().location(); |
| if (!forwardedImpl) |
| return false; |
| auto& impl = *forwardedImpl; |
| auto nativeValue = valueToUSVString(state, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setHref(activeDOMWindow(state), firstDOMWindow(state), WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSDocumentSelectedStylesheetSet(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "selectedStylesheetSet"); |
| } |
| auto& impl = castedThis->wrapped(); |
| auto nativeValue = valueToStringWithUndefinedOrNullCheck(state, value); |
| RETURN_IF_EXCEPTION(throwScope, false); |
| impl.setSelectedStylesheetSet(WTFMove(nativeValue)); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnbeforecopy(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onbeforecopy"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().beforecopyEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnbeforecut(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onbeforecut"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().beforecutEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnbeforepaste(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onbeforepaste"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().beforepasteEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOncopy(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "oncopy"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().copyEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOncut(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "oncut"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().cutEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnpaste(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onpaste"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().pasteEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnselectstart(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onselectstart"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().selectstartEvent, value); |
| return true; |
| } |
| |
| |
| #if ENABLE(FULLSCREEN_API) |
| bool setJSDocumentOnwebkitfullscreenchange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitfullscreenchange"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitfullscreenchangeEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(FULLSCREEN_API) |
| bool setJSDocumentOnwebkitfullscreenerror(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitfullscreenerror"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitfullscreenerrorEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| bool setJSDocumentOnselectionchange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onselectionchange"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().selectionchangeEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnreadystatechange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return false; |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().readystatechangeEvent, value); |
| return true; |
| } |
| |
| |
| #if ENABLE(CSP_NEXT) |
| bool setJSDocumentOnsecuritypolicyviolation(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onsecuritypolicyviolation"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().securitypolicyviolationEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(POINTER_LOCK) |
| bool setJSDocumentOnpointerlockchange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onpointerlockchange"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().pointerlockchangeEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(POINTER_LOCK) |
| bool setJSDocumentOnpointerlockerror(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onpointerlockerror"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().pointerlockerrorEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| bool setJSDocumentOnabort(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onabort"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().abortEvent, value); |
| return true; |
| } |
| |
| |
| #if ENABLE(REQUEST_AUTOCOMPLETE) |
| bool setJSDocumentOnautocomplete(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onautocomplete"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().autocompleteEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(REQUEST_AUTOCOMPLETE) |
| bool setJSDocumentOnautocompleteerror(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onautocompleteerror"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().autocompleteerrorEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| bool setJSDocumentOnblur(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onblur"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().blurEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOncanplay(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "oncanplay"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().canplayEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOncanplaythrough(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "oncanplaythrough"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().canplaythroughEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnchange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onchange"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().changeEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnclick(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onclick"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().clickEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOncontextmenu(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "oncontextmenu"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().contextmenuEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOncuechange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "oncuechange"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().cuechangeEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOndblclick(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ondblclick"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().dblclickEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOndrag(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ondrag"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().dragEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOndragend(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ondragend"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().dragendEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOndragenter(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ondragenter"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().dragenterEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOndragleave(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ondragleave"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().dragleaveEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOndragover(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ondragover"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().dragoverEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOndragstart(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ondragstart"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().dragstartEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOndrop(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ondrop"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().dropEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOndurationchange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ondurationchange"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().durationchangeEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnemptied(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onemptied"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().emptiedEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnended(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onended"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().endedEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnerror(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onerror"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().errorEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnfocus(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onfocus"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().focusEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOninput(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "oninput"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().inputEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOninvalid(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "oninvalid"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().invalidEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnkeydown(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onkeydown"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().keydownEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnkeypress(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onkeypress"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().keypressEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnkeyup(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onkeyup"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().keyupEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnload(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onload"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().loadEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnloadeddata(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onloadeddata"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().loadeddataEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnloadedmetadata(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onloadedmetadata"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().loadedmetadataEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnloadstart(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onloadstart"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().loadstartEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnmousedown(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onmousedown"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().mousedownEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnmouseenter(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return false; |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().mouseenterEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnmouseleave(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return false; |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().mouseleaveEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnmousemove(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onmousemove"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().mousemoveEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnmouseout(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onmouseout"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().mouseoutEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnmouseover(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onmouseover"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().mouseoverEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnmouseup(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onmouseup"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().mouseupEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnmousewheel(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onmousewheel"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().mousewheelEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnpause(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onpause"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().pauseEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnplay(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onplay"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().playEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnplaying(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onplaying"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().playingEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnprogress(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onprogress"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().progressEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnratechange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onratechange"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().ratechangeEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnreset(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onreset"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().resetEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnresize(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onresize"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().resizeEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnscroll(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onscroll"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().scrollEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnseeked(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onseeked"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().seekedEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnseeking(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onseeking"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().seekingEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnselect(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onselect"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().selectEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnstalled(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onstalled"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().stalledEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnsubmit(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onsubmit"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().submitEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnsuspend(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onsuspend"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().suspendEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOntimeupdate(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ontimeupdate"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().timeupdateEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnvolumechange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onvolumechange"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().volumechangeEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnwaiting(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwaiting"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().waitingEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnsearch(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onsearch"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().searchEvent, value); |
| return true; |
| } |
| |
| |
| bool setJSDocumentOnwheel(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwheel"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().wheelEvent, value); |
| return true; |
| } |
| |
| |
| #if ENABLE(TOUCH_EVENTS) |
| bool setJSDocumentOntouchcancel(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ontouchcancel"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().touchcancelEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(TOUCH_EVENTS) |
| bool setJSDocumentOntouchend(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ontouchend"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().touchendEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(TOUCH_EVENTS) |
| bool setJSDocumentOntouchmove(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ontouchmove"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().touchmoveEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(TOUCH_EVENTS) |
| bool setJSDocumentOntouchstart(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ontouchstart"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().touchstartEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(TOUCH_EVENTS) |
| bool setJSDocumentOntouchforcechange(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "ontouchforcechange"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().touchforcechangeEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| bool setJSDocumentOnwebkitmouseforcechanged(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitmouseforcechanged"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitmouseforcechangedEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| bool setJSDocumentOnwebkitmouseforcedown(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitmouseforcedown"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitmouseforcedownEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| bool setJSDocumentOnwebkitmouseforcewillbegin(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitmouseforcewillbegin"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitmouseforcewillbeginEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(MOUSE_FORCE_EVENTS) |
| bool setJSDocumentOnwebkitmouseforceup(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitmouseforceup"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitmouseforceupEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| bool setJSDocumentOnwebkitwillrevealbottom(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitwillrevealbottom"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitwillrevealbottomEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| bool setJSDocumentOnwebkitwillrevealleft(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitwillrevealleft"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitwillrevealleftEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| bool setJSDocumentOnwebkitwillrevealright(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitwillrevealright"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitwillrevealrightEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| #if ENABLE(WILL_REVEAL_EDGE_EVENTS) |
| bool setJSDocumentOnwebkitwillrevealtop(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue value = JSValue::decode(encodedValue); |
| UNUSED_PARAM(thisValue); |
| JSDocument* castedThis = jsDocumentCast(JSValue::decode(thisValue)); |
| if (UNLIKELY(!castedThis)) { |
| return throwSetterTypeError(*state, throwScope, "Document", "onwebkitwillrevealtop"); |
| } |
| setEventHandlerAttribute(*state, *castedThis, castedThis->wrapped(), eventNames().webkitwillrevealtopEvent, value); |
| return true; |
| } |
| |
| #endif |
| |
| JSValue JSDocument::getConstructor(VM& vm, const JSGlobalObject* globalObject) |
| { |
| return getDOMConstructor<JSDocumentConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject)); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateElement(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createElement"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto tagName = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createElementForBindings(WTFMove(tagName), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateDocumentFragment(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createDocumentFragment"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createDocumentFragment()); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTextNode(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createTextNode"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto data = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createTextNode(WTFMove(data))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateComment(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createComment"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto data = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createComment(WTFMove(data))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateCDATASection(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createCDATASection"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto data = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createCDATASection(WTFMove(data), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateProcessingInstruction(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createProcessingInstruction"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 2)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto target = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| auto data = state->uncheckedArgument(1).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createProcessingInstruction(WTFMove(target), WTFMove(data), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateAttribute(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createAttribute"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto name = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createAttribute(WTFMove(name), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByTagName(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "getElementsByTagName"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto tagname = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.getElementsByTagName(WTFMove(tagname))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionImportNode(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "importNode"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto importedNode = JSNode::toWrapped(state->uncheckedArgument(0)); |
| if (UNLIKELY(!importedNode)) |
| return throwArgumentTypeError(*state, throwScope, 0, "importedNode", "Document", "importNode", "Node"); |
| auto deep = state->argument(1).toBoolean(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.importNode(*importedNode, WTFMove(deep), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateElementNS(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createElementNS"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 2)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto namespaceURI = valueToStringWithUndefinedOrNullCheck(state, state->uncheckedArgument(0)); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| auto qualifiedName = state->uncheckedArgument(1).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createElementNS(WTFMove(namespaceURI), WTFMove(qualifiedName), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateAttributeNS(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createAttributeNS"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 2)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto namespaceURI = valueToStringWithUndefinedOrNullCheck(state, state->uncheckedArgument(0)); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| auto qualifiedName = state->uncheckedArgument(1).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createAttributeNS(WTFMove(namespaceURI), WTFMove(qualifiedName), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByTagNameNS(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "getElementsByTagNameNS"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 2)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto namespaceURI = valueToStringWithUndefinedOrNullCheck(state, state->uncheckedArgument(0)); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| auto localName = state->uncheckedArgument(1).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.getElementsByTagNameNS(WTFMove(namespaceURI), WTFMove(localName))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionAdoptNode(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "adoptNode"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto source = JSNode::toWrapped(state->uncheckedArgument(0)); |
| if (UNLIKELY(!source)) |
| return throwArgumentTypeError(*state, throwScope, 0, "source", "Document", "adoptNode", "Node"); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.adoptNode(*source, ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateEvent(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createEvent"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto eventType = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createEvent(WTFMove(eventType), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateRange(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createRange"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createRange()); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateNodeIterator(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createNodeIterator"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto root = JSNode::toWrapped(state->uncheckedArgument(0)); |
| if (UNLIKELY(!root)) |
| return throwArgumentTypeError(*state, throwScope, 0, "root", "Document", "createNodeIterator", "Node"); |
| auto whatToShow = state->argument(1).isUndefined() ? 0xFFFFFFFF : convert<uint32_t>(*state, state->uncheckedArgument(1), NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| RefPtr<NodeFilter> filter; |
| if (!state->argument(2).isUndefinedOrNull()) { |
| if (!state->uncheckedArgument(2).isObject()) |
| return throwArgumentMustBeFunctionError(*state, throwScope, 2, "filter", "Document", "createNodeIterator"); |
| filter = JSNodeFilter::create(asObject(state->uncheckedArgument(2)), castedThis->globalObject()); |
| } |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createNodeIterator(*root, WTFMove(whatToShow), WTFMove(filter))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTreeWalker(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createTreeWalker"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto root = JSNode::toWrapped(state->uncheckedArgument(0)); |
| if (UNLIKELY(!root)) |
| return throwArgumentTypeError(*state, throwScope, 0, "root", "Document", "createTreeWalker", "Node"); |
| auto whatToShow = state->argument(1).isUndefined() ? 0xFFFFFFFF : convert<uint32_t>(*state, state->uncheckedArgument(1), NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| RefPtr<NodeFilter> filter; |
| if (!state->argument(2).isUndefinedOrNull()) { |
| if (!state->uncheckedArgument(2).isObject()) |
| return throwArgumentMustBeFunctionError(*state, throwScope, 2, "filter", "Document", "createTreeWalker"); |
| filter = JSNodeFilter::create(asObject(state->uncheckedArgument(2)), castedThis->globalObject()); |
| } |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.createTreeWalker(*root, WTFMove(whatToShow), WTFMove(filter))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetOverrideStyle(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "getOverrideStyle"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| Element* element = nullptr; |
| if (!state->argument(0).isUndefinedOrNull()) { |
| element = JSElement::toWrapped(state->uncheckedArgument(0)); |
| if (UNLIKELY(!element)) |
| return throwArgumentTypeError(*state, throwScope, 0, "element", "Document", "getOverrideStyle", "Element"); |
| } |
| auto pseudoElement = state->argument(1).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.getOverrideStyle(WTFMove(element), WTFMove(pseudoElement))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateExpression(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createExpression"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| ExceptionCode ec = 0; |
| auto expression = state->argument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| RefPtr<XPathNSResolver> resolver = nullptr; |
| if (!state->argument(1).isUndefinedOrNull()) { |
| resolver = JSXPathNSResolver::toWrapped(*state, state->uncheckedArgument(1)); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| if (UNLIKELY(!resolver)) |
| return throwArgumentTypeError(*state, throwScope, 1, "resolver", "Document", "createExpression", "XPathNSResolver"); |
| } |
| JSValue result = toJS(state, castedThis->globalObject(), impl.createExpression(WTFMove(expression), WTFMove(resolver), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateNSResolver(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "createNSResolver"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| Node* nodeResolver = nullptr; |
| if (!state->uncheckedArgument(0).isUndefinedOrNull()) { |
| nodeResolver = JSNode::toWrapped(state->uncheckedArgument(0)); |
| if (UNLIKELY(!nodeResolver)) |
| return throwArgumentTypeError(*state, throwScope, 0, "nodeResolver", "Document", "createNSResolver", "Node"); |
| } |
| JSValue result = toJS(state, castedThis->globalObject(), impl.createNSResolver(WTFMove(nodeResolver))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionEvaluate(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "evaluate"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| ExceptionCode ec = 0; |
| auto expression = state->argument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| Node* contextNode = nullptr; |
| if (!state->argument(1).isUndefinedOrNull()) { |
| contextNode = JSNode::toWrapped(state->uncheckedArgument(1)); |
| if (UNLIKELY(!contextNode)) |
| return throwArgumentTypeError(*state, throwScope, 1, "contextNode", "Document", "evaluate", "Node"); |
| } |
| RefPtr<XPathNSResolver> resolver = nullptr; |
| if (!state->argument(2).isUndefinedOrNull()) { |
| resolver = JSXPathNSResolver::toWrapped(*state, state->uncheckedArgument(2)); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| if (UNLIKELY(!resolver)) |
| return throwArgumentTypeError(*state, throwScope, 2, "resolver", "Document", "evaluate", "XPathNSResolver"); |
| } |
| auto type = convert<uint16_t>(*state, state->argument(3), NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| XPathResult* inResult = nullptr; |
| if (!state->argument(4).isUndefinedOrNull()) { |
| inResult = JSXPathResult::toWrapped(state->uncheckedArgument(4)); |
| if (UNLIKELY(!inResult)) |
| return throwArgumentTypeError(*state, throwScope, 4, "inResult", "Document", "evaluate", "XPathResult"); |
| } |
| JSValue result = toJS(state, castedThis->globalObject(), impl.evaluate(WTFMove(expression), WTFMove(contextNode), WTFMove(resolver), WTFMove(type), WTFMove(inResult), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionExecCommand(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "execCommand"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto command = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| auto userInterface = state->argument(1).toBoolean(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| auto value = state->argument(2).isUndefined() ? String() : valueToStringWithUndefinedOrNullCheck(state, state->uncheckedArgument(2)); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = jsBoolean(impl.execCommand(WTFMove(command), WTFMove(userInterface), WTFMove(value))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandEnabled(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "queryCommandEnabled"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto command = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = jsBoolean(impl.queryCommandEnabled(WTFMove(command))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandIndeterm(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "queryCommandIndeterm"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto command = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = jsBoolean(impl.queryCommandIndeterm(WTFMove(command))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandState(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "queryCommandState"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto command = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = jsBoolean(impl.queryCommandState(WTFMove(command))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandSupported(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "queryCommandSupported"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto command = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = jsBoolean(impl.queryCommandSupported(WTFMove(command))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQueryCommandValue(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "queryCommandValue"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto command = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = jsStringWithCache(state, impl.queryCommandValue(WTFMove(command))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByName(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "getElementsByName"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto elementName = state->uncheckedArgument(0).toString(state)->toAtomicString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.getElementsByName(WTFMove(elementName))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionElementFromPoint(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "elementFromPoint"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| auto x = convert<int32_t>(*state, state->argument(0), NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| auto y = convert<int32_t>(*state, state->argument(1), NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.elementFromPoint(WTFMove(x), WTFMove(y))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCaretRangeFromPoint(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "caretRangeFromPoint"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| auto x = convert<int32_t>(*state, state->argument(0), NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| auto y = convert<int32_t>(*state, state->argument(1), NormalConversion); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.caretRangeFromPoint(WTFMove(x), WTFMove(y))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetSelection(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "getSelection"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.getSelection()); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetCSSCanvasContext(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "getCSSCanvasContext"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| return JSValue::encode(castedThis->getCSSCanvasContext(*state)); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByClassName(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "getElementsByClassName"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto classNames = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.getElementsByClassName(WTFMove(classNames))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionHasFocus(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "hasFocus"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsBoolean(impl.hasFocus()); |
| return JSValue::encode(result); |
| } |
| |
| #if ENABLE(POINTER_LOCK) |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionExitPointerLock(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "exitPointerLock"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| impl.exitPointerLock(); |
| return JSValue::encode(jsUndefined()); |
| } |
| |
| #endif |
| |
| #if ENABLE(CSS_REGIONS) |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionWebkitGetNamedFlows(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "webkitGetNamedFlows"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.webkitGetNamedFlows()); |
| return JSValue::encode(result); |
| } |
| |
| #endif |
| |
| #if ENABLE(WEB_ANIMATIONS) |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetAnimations(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "getAnimations"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| JSValue result = jsArray(state, castedThis->globalObject(), WebCore::DocumentAnimation::getAnimations(impl)); |
| return JSValue::encode(result); |
| } |
| |
| #endif |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementById(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "getElementById"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| auto elementId = AtomicString(state->uncheckedArgument(0).toString(state)->toExistingAtomicString(state)); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.getElementById(WTFMove(elementId))); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionPrepend(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "prepend"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| return JSValue::encode(castedThis->prepend(*state)); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionAppend(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "append"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| return JSValue::encode(castedThis->append(*state)); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQuerySelector(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "querySelector"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto selectors = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJS(state, castedThis->globalObject(), impl.querySelector(WTFMove(selectors), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQuerySelectorAll(ExecState* state) |
| { |
| VM& vm = state->vm(); |
| auto throwScope = DECLARE_THROW_SCOPE(vm); |
| UNUSED_PARAM(throwScope); |
| JSValue thisValue = state->thisValue(); |
| auto castedThis = jsDocumentCast(thisValue); |
| if (UNLIKELY(!castedThis)) |
| return throwThisTypeError(*state, throwScope, "Document", "querySelectorAll"); |
| ASSERT_GC_OBJECT_INHERITS(castedThis, JSDocument::info()); |
| auto& impl = castedThis->wrapped(); |
| if (UNLIKELY(state->argumentCount() < 1)) |
| return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); |
| ExceptionCode ec = 0; |
| auto selectors = state->uncheckedArgument(0).toWTFString(state); |
| RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); |
| JSValue result = toJSNewlyCreated(state, castedThis->globalObject(), impl.querySelectorAll(WTFMove(selectors), ec)); |
| |
| setDOMException(state, throwScope, ec); |
| return JSValue::encode(result); |
| } |
| |
| void JSDocument::visitChildren(JSCell* cell, SlotVisitor& visitor) |
| { |
| auto* thisObject = jsCast<JSDocument*>(cell); |
| ASSERT_GC_OBJECT_INHERITS(thisObject, info()); |
| Base::visitChildren(thisObject, visitor); |
| thisObject->wrapped().visitJSEventListeners(visitor); |
| thisObject->visitAdditionalChildren(visitor); |
| } |
| |
| Document* JSDocument::toWrapped(JSC::JSValue value) |
| { |
| if (auto* wrapper = jsDocumentCast(value)) |
| return &wrapper->wrapped(); |
| return nullptr; |
| } |
| |
| } |