This document requires 'TrustedScript' assignment. (анонимный) @…
- User
This document requires 'TrustedScript' assignment. (анонимный) @ print-preview.bundle.js:15 print-preview.bundle.js:15 The JavaScript Function constructor does not accept TrustedString arguments. See https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor for more information.
- Assistant
This error message in the
print-preview.bundle.jsfile is indicating that the JavaScript function constructor does not permit the use of TrustedString arguments. Trusted Types is a browser security mechanism that helps to mitigate cross-site scripting (XSS) attacks by enforcing stricter rules on the types of values used in certain sensitive JavaScript APIs, including the function constructor.The error message suggests referring to the provided link for more information about Trusted Types for the function constructor. By following the link, you can learn about the specifications and limitations of Trusted Types and understand why the assignment of a TrustedString to the function constructor is not permitted.
To resolve this issue, you will need to find an alternative approach or workaround that does not involve passing a TrustedString as an argument to the function constructor.
- User
- Assistant
- User
у меня кнопки отображаются на листе для печати, как их убрать
- Assistant
If you want to hide the buttons from the print view, you can use CSS media queries to apply different styles when printing. Here's an updated version of the code with CSS modifications to hide the buttons when printing:
<style> @media print { .btn_print, .ui-btn--light { display: none; } } </style> <body> <c:url value="/card2card/status?orderId=${orderId}&formUUID=${formUUID}" var="refreshUrl" /> <div class="app" id="print-box"> <main class="main"> <section class="transfers"> <div class="container-fluid"> <div class="transfers__tabs ui-tabs" data-tabs> <div class="ui-tabs__wrapper"> <div class="ui-tabs__content is-active" data-tabs-content="01"> <form class="ui-form js-validate" action="#"> <table class="ui-table" style="padding-left: 40px"> <!-- table content --> <tfoot> <tr> <td colspan="2"> <div class="row"> <div class="col-xl-auto"> <a class="btn_print ui-btn ui-btn--primary ui-btn--fullwidth" href="#" data-ripple onclick="window.print()">Распечатать</a> </div> <div class="col-xl-auto"> <a href="${backUrl}" class="ui-btn ui-btn--light ui-btn--fullwidth" data-ripple>Перевести еще раз</a> </div> </div> </td> </tr> </tfoot> </table> </form> </div> </div> </div> </div> </section> </main> </div> </body>
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.