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.jquery.client;
017
018/*
019 * #%L
020 * GwtMaterial
021 * %%
022 * Copyright (C) 2015 - 2017 GwtMaterialDesign
023 * %%
024 * Licensed under the Apache License, Version 2.0 (the "License");
025 * you may not use this file except in compliance with the License.
026 * You may obtain a copy of the License at
027 * 
028 *      http://www.apache.org/licenses/LICENSE-2.0
029 * 
030 * Unless required by applicable law or agreed to in writing, software
031 * distributed under the License is distributed on an "AS IS" BASIS,
032 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
033 * See the License for the specific language governing permissions and
034 * limitations under the License.
035 * #L%
036 */
037
038
039import com.google.gwt.core.client.EntryPoint;
040
041/**
042 * Load the JS library if it's not loaded.
043 *
044 * @author Cristian Rinaldi 
045 * @author Andres Testi 
046 */
047public class JQueryEntryPoint implements EntryPoint {
048
049    @Override
050    public void onModuleLoad() {
051        if (!isInjected()) {
052            // TODO: Loader
053        }
054    }
055
056    /**
057     * If jQuery JS loaded?
058     */
059    private native boolean isInjected() /*-{
060        return !(typeof $wnd.jQuery === "undefined") && !(null === $wnd.jQuery);
061    }-*/;
062}