remove pictureInPictureElement

pull/8507/head
Simon H 3 years ago committed by GitHub
parent 17a3d509be
commit f351e662f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1081,7 +1081,6 @@ export interface SvelteMediaTimeRange {
export interface SvelteDocumentAttributes extends HTMLAttributes<Document> { export interface SvelteDocumentAttributes extends HTMLAttributes<Document> {
readonly 'bind:fullscreenElement'?: Document['fullscreenElement'] | undefined | null; readonly 'bind:fullscreenElement'?: Document['fullscreenElement'] | undefined | null;
readonly 'bind:visibilityState'?: Document['visibilityState'] | undefined | null; readonly 'bind:visibilityState'?: Document['visibilityState'] | undefined | null;
readonly 'bind:pictureInPictureElement'?: Document['pictureInPictureElement'] | undefined | null;
} }
export interface SvelteWindowAttributes extends HTMLAttributes<Window> { export interface SvelteWindowAttributes extends HTMLAttributes<Window> {

@ -1778,7 +1778,6 @@ As with `<svelte:window>`, this element may only appear the top level of your co
You can also bind to the following properties: You can also bind to the following properties:
* `fullscreenElement` * `fullscreenElement`
* `pictureInPictureElement`
* `visibilityState` * `visibilityState`
All are readonly. All are readonly.

@ -12,7 +12,6 @@ import compiler_errors from '../compiler_errors';
const valid_bindings = [ const valid_bindings = [
'fullscreenElement', 'fullscreenElement',
'pictureInPictureElement',
'visibilityState' 'visibilityState'
]; ];

@ -11,13 +11,11 @@ import add_actions from './shared/add_actions';
const associated_events = { const associated_events = {
fullscreenElement: ['fullscreenchange'], fullscreenElement: ['fullscreenchange'],
pictureInPictureElement: ['enterpictureinpicture', 'leavepictureinpicture'],
visibilityState: ['visibilitychange'] visibilityState: ['visibilitychange']
}; };
const readonly = new Set([ const readonly = new Set([
'fullscreenElement', 'fullscreenElement',
'pictureInPictureElement',
'visibilityState' 'visibilityState'
]); ]);

@ -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);
}
};

@ -1,7 +0,0 @@
<script>
export let pip;
</script>
<svelte:document bind:pictureInPictureElement={pip}/>
<div />
Loading…
Cancel
Save