<commit_before># Copyright 2012 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This module defines logical names for all events that Tapestry-controlled elements
# trigger or listener for. Prototype requires that all custom events have a namespace prefix; jQuery appears to
# allow it without issue.
define [], ->
  zone: # Invoked on a zone element to force an update to its content. The event memo is the
  # new content (an Element, or a string containing HTML markup). A top-level handler
  # is responsible for the actual update; it fires an event on the element just before,
  # and just after, the content is changed.
    update: "t5:zone-update"

    # Triggered just before the content in a Zone will be updated.
    willUpdate: "t5:zone-will-update"

    # Triggered just afer the content in a Zone has updated. If the zone was not visible,
    # it is made visible after its content is changed, and before this event is triggered.
    didUpdate: "t5:zone-did-update"<commit_msg>Improve documentation for the events module Simplify the module to simply define an object, rather than provide a callback, etc.<commit_after># Copyright 2012 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ## core/events
#
# This module defines logical names for all events that Tapestry-controlled elements
# trigger or listener for. Prototype requires that all custom events have a namespace prefix; jQuery appears to
# allow it without issue.
define
  # Defines a number of event names specific to Tapestry Zones. Zones are Tapestry components that are structured
  # to correctly support dynamic updates from the server via an Ajax request, and a standard response
  # (the partial page render reponse). More details are available in the `core/zone` module.
  zone:
    # Invoked on a zone element to force an update to its content. The event memo is the new content (an Element, or a
    # `core/spi:ElementWrapper`, or a string containing HTML markup). A standard top-level handler is defined by module
    # `core/zone`, and is responsible for the actual update; it triggers the `events.zone.willUpdate` and
    # `events.zone.didUpdate` events just before and just after changing the element's content.
    update: "t5:zone-update"

    # Triggered (by the standard handler) just before the content in a Zone will be updated.
    willUpdate: "t5:zone-will-update"

    # Triggered (by the standard hanndler) just after the content in a Zone has updated. If the zone was not visible, it
    # is made visible after its content is changed, and before this event is triggered.
    didUpdate: "t5:zone-did-update"
{'fraction_non_alphanumeric': 0.05912806539509537, 'fraction_numerical': 0.005994550408719346, 'mean_word_length': 4.028767123287671, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '420008', 'n_tokens_mistral': 930, 'n_tokens_neox': 901, 'n_words': 521}