Skip to content

How it is drawn

The script draws in two ways. Knowing which part is which explains every limit in these docs.

On your page

Almost everything is drawn by the script inside your own page: the search form, the calendar, the guests panel, the book button, the offer table, the header icons, anything you build with your own HTML — and, in the booking window, the room list, the rates, the extras, the step bar and the summary.

  • The ready components sit in a shadow root. Your site’s CSS does not leak into them and theirs does not leak out. You restyle them with the --pms-* CSS variables, not with selectors — except the calendar and the guests panel, whose pieces also have ::part() names.
  • What a component opens over your page — the calendar, the guests panel, a dropdown list, the room dialog, the photo viewer — is drawn in one element of ours at the end of your <body>, [data-pms-booking-overlay], not inside the component’s box. That is why the variables go on :root, and why every ::part() rule names that element: see How a part rule works.
  • Your own HTML stays your own. The script fills in values and sets state attributes; it never adds, removes or reorders an element of yours.
  • Live values are filled in the visitor’s browser. A search engine reads the text you wrote, not the live value — so write a sensible fallback inside every element.

In our frames

Two parts are frames of ours inside your page:

  • the details-and-payment step of the booking window — the guest’s name, email and phone, the card fields, Pay and the confirmation. The rest of the booking window around it is on your page;
  • the guest area — sign-in, bookings, profile.

What that means:

  • The guest stays on your page and your address bar; a frame is as wide as its place and as tall as its content.
  • No guest detail, card field or session ever exists in your page’s DOM, storage or address. Your scripts cannot read into a frame, and you do not need to handle personal data or card data.
  • Your --pms-* variables are read on your page and handed to the frames, within limits: a value that works on your page can be left out in a frame. No other CSS of yours reaches them.
  • The search travels in your page’s address — check_in, check_out, adults, child_ages — so Back, Forward and a shared link all work.

Payment

The card payment happens inside our frame, with the hotel’s own payment account. Your site needs no payment code and no keys.

Languages

The components speak English and Bulgarian. They follow your page’s lang attribute unless the script tag says otherwise — see Language icon.

What your site must allow

  • Allowed origins. The hotel lists your site’s address in Tape Chart Link. Without it the browser refuses the script’s requests, and our frames refuse to be shown on your page.
  • Globals. The script adds two names to window: pmsBooking and __pmsBookingWidget. It uses window.dataLayer only if your site already has one.
  • A Content Security Policy and Trusted Types, if your site sends them: the next two sections.

Content Security Policy

What the script does on your page, by directive. https://link.tape-chart.com stands for the address your script tag loads from.

Directive What to allow Why
script-src https://link.tape-chart.com The script tag loads a small loader, and the loader adds a second script from the same address: the build itself, with an integrity hash. A nonce on your script tag is copied to that second script.
connect-src https://link.tape-chart.com Every request the script makes goes to the address it was loaded from: the property’s configuration, availability, calendar prices, and its own measurement.
frame-src https://link.tape-chart.com The details-and-payment step and the guest area. The frames’ address is named by the property’s configuration; when it names none it is the script’s own address. If the console reports a blocked frame on another address, allow that one.
img-src The address of the hotel’s photographs Room photographs are plain <img> elements on your page. Their address comes from the property’s configuration, not from the script, so it is not written here: read it from a room photograph’s src, or from the console.
font-src Nothing for us The script requests no font file on your page. The components name a font family; the font shows if your page loads it or the device has it.
style-src See below
  • The payment provider needs nothing from your policy. Its card fields are frames inside our frame, and its script runs there. A nested frame is governed by the policy of the frame around it, ours, not by your page’s. Your page loads no payment script.
  • The hotel’s own tags. If the hotel has configured Google Analytics, Google Tag Manager or a Meta Pixel for its booking engine, and the visitor’s consent allows marketing tags, the script adds their scripts from https://www.googletagmanager.com and https://connect.facebook.net. What those scripts then load is theirs to document. Ask the hotel whether it uses them; data-analytics="off" on the script tag switches all of it off.
  • Styles. The components’ styles are stylesheets the script builds and attaches to its own shadow roots. They are not <style> elements and not style attributes in markup, and browsers do not apply style-src to them. The script also sets a few inline styles through the DOM, on its own elements and frames, which style-src does not block either. One library inside the build can add a <style> element to your <head>, to hold the page still while a list or a dialog is open; under a style-src without 'unsafe-inline' the browser refuses that element.
  • A blocked frame does not stay empty. If a frame has not answered within 12 seconds — your policy forbids it, or it could not load — the guest is taken to the same step, or to the guest area, on our own address instead.

What the code does not settle, so check it on your own site with the policy in report-only mode first:

  • the address of the photographs for a given hotel;
  • what a strict style-src costs in practice — none of our tests runs under one;
  • anything the hotel’s own analytics tags load after they start.

Trusted Types

A page that enforces require-trusted-types-for 'script' must allow two policy names in its trusted-types directive:

Policy name Used for Without it
pms-booking-loader The loader adding the build’s script. It vouches for that one address only. The script does not load: nothing is drawn.
pms-booking Adding the hotel’s own Google or Meta tag. It vouches for those two addresses only. The tags are skipped. Everything else works.

Our tests draw a search form and the account menu, and walk the booking window to its details step, on a page that enforces Trusted Types with pms-booking allowed, and see no violation. Those tests load the build directly, without the loader, so test your own pages before you enforce.

The script shows no consent banner: it listens to yours. See Consent. To measure nothing at all on your site, put data-analytics="off" on the script tag.