001// Copyright 2010 The Apache Software Foundation 002// 003// Licensed under the Apache License, Version 2.0 (the "License"); 004// you may not use this file except in compliance with the License. 005// You may obtain a copy of the License at 006// 007// http://www.apache.org/licenses/LICENSE-2.0 008// 009// Unless required by applicable law or agreed to in writing, software 010// distributed under the License is distributed on an "AS IS" BASIS, 011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 012// See the License for the specific language governing permissions and 013// limitations under the License. 014 015package org.apache.tapestry5.services.javascript; 016 017/** 018 * Sets the priority for JavaScript initialization scripting. InitializationPriority allows coarse-grained control 019 * over the order in which initialization occurs on the client. The default is normally {@link #NORMAL}. 020 * 021 * @since 5.2.0 022 */ 023public enum InitializationPriority 024{ 025 /** 026 * Provided JavaScript will be executed immediately (it is not deferred until the page loads). In an Ajax 027 * update, IMMEDIATE code executed after the DOM is updated and before EARLY. 028 */ 029 IMMEDIATE, 030 031 /** Execution is deferred until the page loads. All early execution occurs before {@link #NORMAL}. */ 032 EARLY, 033 034 /** Execution is deferred until the page loads. This is the typical priority. */ 035 NORMAL, 036 037 /** Execution is deferred until the page loads. Execution occurs after {@link #NORMAL}. */ 038 LATE 039}