Basic embed-page demo, Embeddable Progressive Applications Working Group

The <embed-page/> web component is acting as IFRAME. Its content is insulated on JS, DOM, CSS and browsing context level( A links and FORM get/post ).

Unlike IFRAME it is embedded inline into parent page DOM and automatically resizing parent node.


Demo(this) page

Visual demo

CSS
    1. The header above should be intact(default) in color and text size.
    2. Colors in demo components and IFRAMEs should match the page name: purple, violet.
JS
    1. Checkboxes on page should not be affected by embed-page content.
    2. Operating the page content here should not affect the component` intestines.
Links
    1. Click on link will replace the component content with page from href attribute.
Form
    1. GET and POST will replace content according to FORM action attribute.
location & window.location & document.location
    1. page in component populates text box with value matching SRC attribute of component.
    2. clear the text box, click on GET. The full URL matching SRC attribute
       should be placed in text box
    3. change text box to page-purple.html, click on SET. The content of component
       should load the page
    4. repeat step 1-3 with 'href-get', 'href-set', 'location get', 'location set'
    5. add URL properties like hash, port#, query parameters, user, password.
       'other properties' should place matching key-value in text box.
    6. change URL in text box, press 'assign()' or 'replace(), matching content
       should be fetched.
    7. 'reload()' should re-fetch and re-render content. See it in network and UI.
    8. 'location-win-doc' should give true for identical 'location', 'window.location'
       , and 'document.location'
    9. 'this===window' should give true
Cookies
    1. set cookies a=b, set cookies c=d
    2. get cookie should have both key/values presented
    3. refresh page, get cookies should have both key/values presented


page.js When used from embed-page, the document is wrapped to reflect component instance scope.
The click will trigger just own instance checkbox.