Hi i’d like to add something like this to html header. How can i proceed?
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
Hi i’d like to add something like this to html header. How can i proceed?
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
Hi @igisho
You can change your DOM like this:
@Component("MyBootstrapListener")
public class MyBootstrapListener implements BootstrapListener {
@Override
public void modifyBootstrapFragment(BootstrapFragmentResponse response) {
}
@Override
public void modifyBootstrapPage(BootstrapPageResponse response) {
Element head = response.getDocument().head();
head.appendElement("meta").attr("name", "viewport")
.attr("content", "width=device-width, initial-scale=1.0");
}
}
Thank you, worked like charm!