Skip to end of metadata
Go to start of metadata

 Download the external Javascript or invoke the inline Javascript, or both.

  • <script> tags are processed in the order they appear in the TDI XML response. If the previous <script> tag is external (has src attribute), the next one waits for the external script to be downloaded (not executed)1.
  • in case the <script> part contains both external and inline scripts, the inline script is going to be invoked after the external one is downloaded (not executed)1.

1) TDI cannot guarantee that the previous script will be executed and ready for the next one (see issue #15). It only guarantees, that the script was downloaded before the next one is processed. When a script depends on some previous one, it should check whether it is already available itself.

 

Syntax

Attributes

Attribut

Value

Description

src

URL

URL of the external Javascript.

id

string

ID of the script. If there is another script on the page with the same name, the script will not be downloaded more than once.

inline js code

string

Inline Javascript code. It is invoked in the window scope!

Events - JS API

Examples

  • No labels