diff --git a/elements/index.d.ts b/elements/index.d.ts index 00450c748d..c2fe47f848 100644 --- a/elements/index.d.ts +++ b/elements/index.d.ts @@ -1081,7 +1081,6 @@ export interface SvelteMediaTimeRange { export interface SvelteDocumentAttributes extends HTMLAttributes { readonly 'bind:fullscreenElement'?: Document['fullscreenElement'] | undefined | null; readonly 'bind:visibilityState'?: Document['visibilityState'] | undefined | null; - readonly 'bind:pictureInPictureElement'?: Document['pictureInPictureElement'] | undefined | null; } export interface SvelteWindowAttributes extends HTMLAttributes { diff --git a/site/content/docs/03-template-syntax.md b/site/content/docs/03-template-syntax.md index 5436c6d608..21dd265f6c 100644 --- a/site/content/docs/03-template-syntax.md +++ b/site/content/docs/03-template-syntax.md @@ -1778,7 +1778,6 @@ As with ``, this element may only appear the top level of your co You can also bind to the following properties: * `fullscreenElement` -* `pictureInPictureElement` * `visibilityState` All are readonly. diff --git a/src/compiler/compile/nodes/Document.ts b/src/compiler/compile/nodes/Document.ts index 90e2b1ab3e..60264aa40e 100644 --- a/src/compiler/compile/nodes/Document.ts +++ b/src/compiler/compile/nodes/Document.ts @@ -12,7 +12,6 @@ import compiler_errors from '../compiler_errors'; const valid_bindings = [ 'fullscreenElement', - 'pictureInPictureElement', 'visibilityState' ]; diff --git a/src/compiler/compile/render_dom/wrappers/Document.ts b/src/compiler/compile/render_dom/wrappers/Document.ts index 5ec46dda86..0a9565e64c 100644 --- a/src/compiler/compile/render_dom/wrappers/Document.ts +++ b/src/compiler/compile/render_dom/wrappers/Document.ts @@ -11,13 +11,11 @@ import add_actions from './shared/add_actions'; const associated_events = { fullscreenElement: ['fullscreenchange'], - pictureInPictureElement: ['enterpictureinpicture', 'leavepictureinpicture'], visibilityState: ['visibilitychange'] }; const readonly = new Set([ 'fullscreenElement', - 'pictureInPictureElement', 'visibilityState' ]); diff --git a/test/runtime/samples/document-binding-pip/_config.js b/test/runtime/samples/document-binding-pip/_config.js deleted file mode 100644 index b6a64f0cf3..0000000000 --- a/test/runtime/samples/document-binding-pip/_config.js +++ /dev/null @@ -1,44 +0,0 @@ -export default { - before_test() { - Object.defineProperties(document, { - pictureInPictureElement: { - value: null, - configurable: true - } - }); - }, - - // copied from window-binding - // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason - skip_if_ssr: true, - - async test({ assert, target, window, component }) { - const enter = new window.Event('enterpictureinpicture'); - - const div = target.querySelector('div'); - - Object.defineProperties(window.document, { - pictureInPictureElement: { - value: div, - configurable: true - } - }); - - window.document.dispatchEvent(enter); - - assert.equal(component.pip, div); - - const leave = new window.Event('leavepictureinpicture'); - - Object.defineProperties(window.document, { - pictureInPictureElement: { - value: null, - configurable: true - } - }); - - window.document.dispatchEvent(leave); - - assert.equal(component.pip, null); - } -}; diff --git a/test/runtime/samples/document-binding-pip/main.svelte b/test/runtime/samples/document-binding-pip/main.svelte deleted file mode 100644 index 8b268d27e6..0000000000 --- a/test/runtime/samples/document-binding-pip/main.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - - - -
\ No newline at end of file