javascript - Does the same-origin policy count for CSS styling? -


i working booking system handles our sites bookings our customers. when customer checks room availability, done on booking site, (redirected) not on our site.

my question is: regards same-origin policy, count css styling? allowed change background color match of ours inside iframe?

it has nothing same-origin policy - applying css file iframe possible, though not recommeded. can create link element refer css file , set inside iframe:

var link = document.createelement("link"); link.href = "http://example/css/style.css";  // css url link.rel = "stylesheet";   link.type = "text/css";   frames['frame1'].document.body.appendchild(link);  

this code "pushes" iframe's html link css file.

note: if iframe's html source existing css rules have overriding styles (for example, set !important), css values may overruled.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -