Javascript Reference - HTML DOM IFrame seamless Property








The seamless property sets or gets whether an <iframe> should have borders or scrollbars.

Browser Support

seamless no no no no no

Syntax

Return the seamless property.

var v = iframeObject.seamless

Set the seamless property.

iframeObject.seamless=true|false 

Property Values

Value Description
true|false
  • true - The iframe should look like it is a part of the containing document
  • false - Default. The iframe should not look like it is a part of the containing document




Return Value

A Boolean type value, true if the iframe looks like it is a part of the containing document, otherwise it returns false.

Example


<!DOCTYPE html>
<html>
<body>
<iframe id="myFrame" src="http://example.com" height="200" width="250"></iframe>
<p id="demo"></p>
<button onclick="myFunction()">test</button>
<script>
function myFunction() {<!--   w w  w.j a  va  2 s  .c o  m-->
    var x = document.getElementById("myFrame").seamless;
    document.getElementById("demo").innerHTML = x;
    document.getElementById("myFrame").seamless = true;
}
</script>

</body>
</html>

The code above is rendered as follows: