Skip to content

Commit 3bf037c

Browse files
yaroslavafenkindaniel-becktimja
authored
[JENKINS-71047] Deprecate inline JS event handlers (#8061)
Co-authored-by: Daniel Beck <[email protected]> Co-authored-by: Yaroslav Afenkin <[email protected]> Co-authored-by: Tim Jacomb <[email protected]>
1 parent ef42f3c commit 3bf037c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

core/src/main/resources/lib/form/readOnlyTextbox.jelly

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@ THE SOFTWARE.
6262
If @field is specified, this will be inferred automatically,
6363
which is the recommended approach.
6464
</st:attribute>
65+
<st:attribute name="onchange" deprecated="true">
66+
Inline JavaScript to execute when the textbox is changed.
67+
Deprecated because this attribute is incompatible with adding Content-Security-Policy to the Jenkins UI in the future.
68+
Set 'id' or 'clazz' attributes as appropriate to look up this element in external Javascript files (e.g. adjuncts)
69+
to add the desired behavior there (DOMContentLoaded event in static forms, Behaviour.specify if this element may be
70+
dynamically added). See https://github.com/jenkinsci/jenkins/pull/6852 for an example.
71+
</st:attribute>
72+
<st:attribute name="onkeyup" deprecated="true">
73+
Inline JavaScript to execute when the keyup event is fired.
74+
Deprecated because this attribute is incompatible with adding Content-Security-Policy to the Jenkins UI in the future.
75+
Set 'id' or 'clazz' attributes as appropriate to look up this element in external Javascript files (e.g. adjuncts)
76+
to add the desired behavior there (DOMContentLoaded event in static forms, Behaviour.specify if this element may be
77+
dynamically added). See https://github.com/jenkinsci/jenkins/pull/6852 for an example.
78+
</st:attribute>
6579
</st:documentation>
6680
<f:prepareDatabinding />
6781
<input class="jenkins-input ${attrs.checkUrl!=null?'validated':''} ${attrs.clazz}"

0 commit comments

Comments
 (0)