Skip to content

Document Source Text repeat() shorthand - #9

Closed
ivg-design wants to merge 1 commit into
docsforadobe:masterfrom
ivg-design:codex/document-source-text-repeat
Closed

Document Source Text repeat() shorthand#9
ivg-design wants to merge 1 commit into
docsforadobe:masterfrom
ivg-design:codex/document-source-text-repeat

Conversation

@ivg-design

Copy link
Copy Markdown

Summary

  • explain that Source Text values can use standard JavaScript String methods when the JavaScript expression engine is active
  • document the receiver-less repeat(count) form alongside explicit value.repeat(count) and text.sourceText.repeat(count) examples
  • clarify that repeat() is not a global After Effects method and is undefined as a bare call on numeric properties

Why

After Effects treats Source Text as a JavaScript string and resolves supported instance methods against the current property. This makes repeat(3) valid in a Source Text expression even though the same unqualified call is not defined on a numeric property.

The method itself is the standard ES2015 String.prototype.repeat() method; this change documents the After Effects-specific context in which its receiver can be omitted without presenting it as a new After Effects global or a TextDocument API.

Verification

  • AE 27.0x8 Beta, JavaScript expression engine:
    • repeat(3), value.repeat(3), and text.sourceText.repeat(3) on Source Text each returned the expected repeated text with an empty expressionError
    • bare repeat(3) on a Slider reported ReferenceError: repeat is not defined
    • explicit "X".repeat(3) remained available on the Slider expression
  • mkdocs build --strict

Document that repeat() is a standard JavaScript String method resolved against Source Text's current-property context, not a global After Effects API. Include explicit forms and the numeric-property limitation.\n\nValidated with mkdocs build --strict.
@ivg-design

Copy link
Copy Markdown
Author

Replaced by #10 to use the requested source branch name without the codex/ prefix.

@ivg-design ivg-design closed this Aug 11, 2026
@ivg-design
ivg-design deleted the codex/document-source-text-repeat branch August 11, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant