001/*
002 * Copyright 2014 Cristian Rinaldi & Andres Testi.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package gwt.material.design.jscore.client.api;
017
018import gwt.material.design.jscore.client.api.html.StyleSheetList;
019import gwt.material.design.jscore.client.api.core.Element;
020import gwt.material.design.jscore.client.api.core.NodeList;
021import gwt.material.design.jscore.client.api.html.HTMLBodyElement;
022import gwt.material.design.jscore.client.api.html.HTMLElement;
023import jsinterop.annotations.JsProperty;
024import jsinterop.annotations.JsType;
025
026/**
027 * Represent a Document
028 *
029 * @author Cristian Rinaldi <a
030 * href="mailto:csrinaldi@gmail.com?Subject=JQuery">csrinaldi@gmail.com</a>
031 * @author Andres Testi <a
032 * href="mailto:andres.a.testi@gmail.com?Subject=JQuery">andres.a.testi@gmail.com</a>
033 */
034@JsType(isNative = true)
035public class Document {
036
037    public native HTMLElement createElement(String element);
038
039    public native HTMLElement getElementsByTagName(String body);
040
041    @JsProperty
042    public native HTMLBodyElement getBody();
043
044    public native Element querySelector(String selector);
045
046    public native NodeList querySelectorAll(String selector);
047    
048    @JsProperty
049    public native StyleSheetList getStyleSheets();
050}