CARVIEW |
Select Language
HTTP/2 200
date: Tue, 29 Jul 2025 07:06:03 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"aeb930e47c036c8dcd47d1a257491842"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=ofytgR6kpME8l1NIIJXP6xFxt0m6DCVwpQndx2iECYeBPAO0xWgNvdsLcdsl%2FlHX%2BA9p%2BnfFimYzU45GiJIhMICmBBFV52bkI4Z7vylP82HgRomOzN39R8CetfoOpqGpHsR8YCN9JwbEuvYcYHVlQLgYrfl6EFkXkPOnQYiOmMoRiisXuyqW1aAFMbl1BUo69JLa5%2BgFR%2BQpDXh99FSctxsKGXxD5DQBzXEaX9ifDk4Tqo8rJSB%2BEl3mBLneiUdXLjyfOL7W0LCZkB%2Frv9RX7A%3D%3D--7R1EXZrtRPx6lI5%2B--fbpVKRj1ApQ0fAoDq%2FD92g%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1415735772.1753772762; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 07:06:02 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 07:06:02 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: B4B2:2896DD:531DE1:69EAE2:688872DA
Callbacks · ichord/At.js Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 669
Callbacks
Michael Gollmick edited this page Jan 9, 2018
·
8 revisions
# Functions set for handling and rendering the data.
# Others developers can override these methods to tweak At.js such as matcher.
# We can override them in `callbacks` settings.
#
# @mixin
#
# The context of these functions is `$.atwho.Controller` object and they are called in this sequences:
#
# [beforeSave, matcher, filter, remoteFilter, afterMatchFailed, sorter, tplEval, highlighter, beforeReposition, beforeInsert, ]
#
DEFAULT_CALLBACKS =
# It would be called to restructure the data before At.js invokes `Model#save` to save data
# In default, At.js will convert it to a Hash Array.
#
# @param data [Array] data to refacotor.
# @return [Array] Data after refactor.
beforeSave: (data) ->
# It would be called to match the `flag`.
# It will match at start of line or after whitespace
#
# @param flag [String] current `flag` ("@", etc)
# @param subtext [String] Text from start to current caret position.
#
# @return [String | null] Matched result.
matcher: (flag, subtext, should_startWithSpace, acceptSpaceBar) ->
# ---------------------
# Filter data by matched string.
#
# @param query [String] Matched string.
# @param data [Array] data list
# @param searchKey [String] at char for searching.
#
# @return [Array] result data.
filter: (query, data, searchKey) ->
# If a function is given, At.js will invoke it if local filter can not find any data
#
# @param params [String] matched query
# @param callback [Function] callback to render page.
remoteFilter: null
# remoteFilter: (query, callback) ->
# $.ajax url,
# data: params
# success: (data) ->
# callback(data)
# Sorter data of course.
#
# @param query [String] matched string
# @param items [Array] data that was refactored
# @param searchKey [String] at char to search
#
# @return [Array] sorted data
sorter: (query, items, searchKey) ->
# Eval template for every single item in display list.
#
# @param tpl [String] The template string.
# @param map [Hash] Data map to eval.
#
# @return [String] the composed display data
tplEval: (tpl, map) ->
# Highlight the `matched query` string.
#
# @param li [String] HTML String after eval.
# @param query [String] matched query.
#
# @return [String] highlighted string.
highlighter: (li, query) ->
# What to do before inserting item's value into inputor.
#
# @param value [String] content to insert
# @param $li [jQuery Object] the chosen item
#
# @return [String] altered content to insert.
beforeInsert: (value, $li) ->
# You can adjust the menu's offset here.
#
# @param offset [Hash] offset will be applied to menu
# beforeReposition: (offset) ->
# offset.left += 10
# offset.top += 10
# offset
beforeReposition: (offset) ->
# After the `matcher` was failed, which it can't get any query string.
afterMatchFailed: (at, el) ->
You can’t perform that action at this time.