Skip to main content
12-Amethyst
May 22, 2023
Solved

Create a variable browser tab display name

  • May 22, 2023
  • 1 reply
  • 1066 views

Hi everyone,

 

I am currently working on TWX 9.3.4-b1190 and I wonder, if there is a way to change the Browser tab display name dynamically. Right now, you can not bind the Title property on a master mashup and the solution provided in the link below does not seem to work for newer TWW versions.

 

Solved: how to make make a variable title for a Master Ma... - PTC Community

 

Best regards 
Markus

Best answer by nmutter

The error with previous functionality is now 'Uncaught ReferenceError: $ is not defined'.

 

I think you can only do it with a custom extension widget now, which executes

document.title = newTitle;

https://developer.mozilla.org/en-US/docs/Web/API/Document/title

With the replacement of "Non-Secure"-Expressions (MigratingNonSecureFunctions.html) the manipulation of the DOM (like changing title) is no longer possible. At least I did not find a way for now... The expressions are executed in some "sandbox"-environment having only a limited scope. So $ (from jquery) is not available anymore.

1 reply

nmutter16-PearlAnswer
16-Pearl
May 23, 2023

The error with previous functionality is now 'Uncaught ReferenceError: $ is not defined'.

 

I think you can only do it with a custom extension widget now, which executes

document.title = newTitle;

https://developer.mozilla.org/en-US/docs/Web/API/Document/title

With the replacement of "Non-Secure"-Expressions (MigratingNonSecureFunctions.html) the manipulation of the DOM (like changing title) is no longer possible. At least I did not find a way for now... The expressions are executed in some "sandbox"-environment having only a limited scope. So $ (from jquery) is not available anymore.