happy-dom 13.6.2 → 13.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of happy-dom might be problematic. Click here for more details.
- package/cjs/PropertySymbol.cjs +2 -1
- package/cjs/PropertySymbol.cjs.map +1 -1
- package/cjs/PropertySymbol.d.ts +1 -0
- package/cjs/PropertySymbol.d.ts.map +1 -1
- package/cjs/browser/BrowserFrame.cjs +12 -2
- package/cjs/browser/BrowserFrame.cjs.map +1 -1
- package/cjs/browser/BrowserFrame.d.ts.map +1 -1
- package/cjs/browser/detached-browser/DetachedBrowserFrame.cjs +12 -2
- package/cjs/browser/detached-browser/DetachedBrowserFrame.cjs.map +1 -1
- package/cjs/browser/detached-browser/DetachedBrowserFrame.d.ts.map +1 -1
- package/cjs/browser/utilities/BrowserFrameFactory.cjs +5 -0
- package/cjs/browser/utilities/BrowserFrameFactory.cjs.map +1 -1
- package/cjs/browser/utilities/BrowserFrameFactory.d.ts.map +1 -1
- package/cjs/browser/utilities/BrowserFrameNavigator.cjs +20 -13
- package/cjs/browser/utilities/BrowserFrameNavigator.cjs.map +1 -1
- package/cjs/browser/utilities/BrowserFrameNavigator.d.ts +21 -10
- package/cjs/browser/utilities/BrowserFrameNavigator.d.ts.map +1 -1
- package/cjs/browser/utilities/BrowserFrameURL.cjs +2 -2
- package/cjs/browser/utilities/BrowserFrameURL.cjs.map +1 -1
- package/cjs/browser/utilities/BrowserFrameURL.d.ts.map +1 -1
- package/cjs/config/IHTMLElementTagNameMap.cjs +3 -0
- package/cjs/config/IHTMLElementTagNameMap.cjs.map +1 -0
- package/cjs/config/IHTMLElementTagNameMap.d.ts +146 -0
- package/cjs/config/IHTMLElementTagNameMap.d.ts.map +1 -0
- package/cjs/config/ISVGElementTagNameMap.cjs +3 -0
- package/cjs/config/ISVGElementTagNameMap.cjs.map +1 -0
- package/cjs/config/ISVGElementTagNameMap.d.ts +67 -0
- package/cjs/config/ISVGElementTagNameMap.d.ts.map +1 -0
- package/cjs/event/events/HashChangeEvent.cjs +26 -0
- package/cjs/event/events/HashChangeEvent.cjs.map +1 -0
- package/cjs/event/events/HashChangeEvent.d.ts +19 -0
- package/cjs/event/events/HashChangeEvent.d.ts.map +1 -0
- package/cjs/event/events/IHashChangeEventInit.cjs +3 -0
- package/cjs/event/events/IHashChangeEventInit.cjs.map +1 -0
- package/cjs/event/events/IHashChangeEventInit.d.ts +6 -0
- package/cjs/event/events/IHashChangeEventInit.d.ts.map +1 -0
- package/cjs/fetch/Fetch.cjs +10 -34
- package/cjs/fetch/Fetch.cjs.map +1 -1
- package/cjs/fetch/Fetch.d.ts +0 -10
- package/cjs/fetch/Fetch.d.ts.map +1 -1
- package/cjs/fetch/Request.cjs +2 -2
- package/cjs/fetch/Request.cjs.map +1 -1
- package/cjs/fetch/Response.cjs +2 -6
- package/cjs/fetch/Response.cjs.map +1 -1
- package/cjs/fetch/Response.d.ts.map +1 -1
- package/cjs/fetch/SyncFetch.cjs +3 -3
- package/cjs/fetch/SyncFetch.cjs.map +1 -1
- package/cjs/fetch/utilities/FetchBodyUtility.cjs +62 -19
- package/cjs/fetch/utilities/FetchBodyUtility.cjs.map +1 -1
- package/cjs/fetch/utilities/FetchBodyUtility.d.ts +24 -12
- package/cjs/fetch/utilities/FetchBodyUtility.d.ts.map +1 -1
- package/cjs/fetch/utilities/FetchRequestHeaderUtility.cjs +5 -3
- package/cjs/fetch/utilities/FetchRequestHeaderUtility.cjs.map +1 -1
- package/cjs/fetch/utilities/FetchRequestHeaderUtility.d.ts.map +1 -1
- package/cjs/fetch/utilities/FetchRequestReferrerUtility.cjs +1 -1
- package/cjs/fetch/utilities/FetchRequestReferrerUtility.cjs.map +1 -1
- package/cjs/fetch/utilities/FetchRequestReferrerUtility.d.ts.map +1 -1
- package/cjs/form-data/FormData.cjs +1 -1
- package/cjs/form-data/FormData.cjs.map +1 -1
- package/cjs/form-data/FormData.d.ts +1 -1
- package/cjs/form-data/FormData.d.ts.map +1 -1
- package/cjs/index.cjs +7 -3
- package/cjs/index.cjs.map +1 -1
- package/cjs/index.d.ts +7 -3
- package/cjs/index.d.ts.map +1 -1
- package/cjs/location/Location.cjs +270 -0
- package/cjs/location/Location.cjs.map +1 -0
- package/cjs/location/Location.d.ts +144 -0
- package/cjs/location/Location.d.ts.map +1 -0
- package/cjs/named-node-map/NamedNodeMap.cjs +2 -1
- package/cjs/named-node-map/NamedNodeMap.cjs.map +1 -1
- package/cjs/named-node-map/NamedNodeMap.d.ts.map +1 -1
- package/cjs/nodes/document/Document.cjs +4 -4
- package/cjs/nodes/document/Document.cjs.map +1 -1
- package/cjs/nodes/document/Document.d.ts +114 -6
- package/cjs/nodes/document/Document.d.ts.map +1 -1
- package/cjs/nodes/document/IDocument.d.ts +28 -12
- package/cjs/nodes/document/IDocument.d.ts.map +1 -1
- package/cjs/nodes/document-fragment/DocumentFragment.cjs +2 -2
- package/cjs/nodes/document-fragment/DocumentFragment.cjs.map +1 -1
- package/cjs/nodes/document-fragment/DocumentFragment.d.ts +31 -1
- package/cjs/nodes/document-fragment/DocumentFragment.d.ts.map +1 -1
- package/cjs/nodes/document-fragment/IDocumentFragment.d.ts +6 -0
- package/cjs/nodes/document-fragment/IDocumentFragment.d.ts.map +1 -1
- package/cjs/nodes/element/Element.cjs +1 -1
- package/cjs/nodes/element/Element.cjs.map +1 -1
- package/cjs/nodes/element/Element.d.ts +61 -1
- package/cjs/nodes/element/Element.d.ts.map +1 -1
- package/cjs/nodes/element/HTMLCollection.cjs +2 -1
- package/cjs/nodes/element/HTMLCollection.cjs.map +1 -1
- package/cjs/nodes/element/HTMLCollection.d.ts.map +1 -1
- package/cjs/nodes/html-anchor-element/HTMLAnchorElement.cjs +2 -0
- package/cjs/nodes/html-anchor-element/HTMLAnchorElement.cjs.map +1 -1
- package/cjs/nodes/html-anchor-element/HTMLAnchorElement.d.ts.map +1 -1
- package/cjs/nodes/html-button-element/HTMLButtonElement.cjs +93 -4
- package/cjs/nodes/html-button-element/HTMLButtonElement.cjs.map +1 -1
- package/cjs/nodes/html-button-element/HTMLButtonElement.d.ts +49 -1
- package/cjs/nodes/html-button-element/HTMLButtonElement.d.ts.map +1 -1
- package/cjs/nodes/html-button-element/IHTMLButtonElement.d.ts +5 -1
- package/cjs/nodes/html-button-element/IHTMLButtonElement.d.ts.map +1 -1
- package/cjs/nodes/html-form-element/HTMLFormControlsCollection.cjs +2 -1
- package/cjs/nodes/html-form-element/HTMLFormControlsCollection.cjs.map +1 -1
- package/cjs/nodes/html-form-element/HTMLFormControlsCollection.d.ts.map +1 -1
- package/cjs/nodes/html-form-element/HTMLFormElement.cjs +104 -9
- package/cjs/nodes/html-form-element/HTMLFormElement.cjs.map +1 -1
- package/cjs/nodes/html-form-element/HTMLFormElement.d.ts +8 -2
- package/cjs/nodes/html-form-element/HTMLFormElement.d.ts.map +1 -1
- package/cjs/nodes/html-iframe-element/HTMLIFrameElement.cjs +14 -0
- package/cjs/nodes/html-iframe-element/HTMLIFrameElement.cjs.map +1 -1
- package/cjs/nodes/html-iframe-element/HTMLIFrameElement.d.ts +10 -0
- package/cjs/nodes/html-iframe-element/HTMLIFrameElement.d.ts.map +1 -1
- package/cjs/nodes/html-iframe-element/HTMLIFrameElementPageLoader.cjs +4 -1
- package/cjs/nodes/html-iframe-element/HTMLIFrameElementPageLoader.cjs.map +1 -1
- package/cjs/nodes/html-iframe-element/HTMLIFrameElementPageLoader.d.ts.map +1 -1
- package/cjs/nodes/html-iframe-element/IHTMLIFrameElement.d.ts +1 -0
- package/cjs/nodes/html-iframe-element/IHTMLIFrameElement.d.ts.map +1 -1
- package/cjs/nodes/html-input-element/HTMLInputElement.cjs +100 -52
- package/cjs/nodes/html-input-element/HTMLInputElement.cjs.map +1 -1
- package/cjs/nodes/html-input-element/HTMLInputElement.d.ts +49 -23
- package/cjs/nodes/html-input-element/HTMLInputElement.d.ts.map +1 -1
- package/cjs/nodes/html-input-element/IHTMLInputElement.d.ts +2 -0
- package/cjs/nodes/html-input-element/IHTMLInputElement.d.ts.map +1 -1
- package/cjs/nodes/html-label-element/HTMLLabelElement.cjs +1 -0
- package/cjs/nodes/html-label-element/HTMLLabelElement.cjs.map +1 -1
- package/cjs/nodes/html-label-element/HTMLLabelElement.d.ts.map +1 -1
- package/cjs/nodes/html-link-element/HTMLLinkElementStyleSheetLoader.cjs +1 -1
- package/cjs/nodes/html-link-element/HTMLLinkElementStyleSheetLoader.cjs.map +1 -1
- package/cjs/nodes/html-script-element/HTMLScriptElementScriptLoader.cjs +1 -1
- package/cjs/nodes/html-script-element/HTMLScriptElementScriptLoader.cjs.map +1 -1
- package/cjs/nodes/html-select-element/HTMLSelectElement.cjs.map +1 -1
- package/cjs/nodes/html-select-element/HTMLSelectElement.d.ts.map +1 -1
- package/cjs/nodes/node/Node.cjs.map +1 -1
- package/cjs/nodes/node/Node.d.ts.map +1 -1
- package/cjs/nodes/parent-node/IParentNode.d.ts +17 -0
- package/cjs/nodes/parent-node/IParentNode.d.ts.map +1 -1
- package/cjs/nodes/parent-node/ParentNodeUtility.cjs.map +1 -1
- package/cjs/nodes/parent-node/ParentNodeUtility.d.ts.map +1 -1
- package/cjs/query-selector/QuerySelector.cjs.map +1 -1
- package/cjs/query-selector/QuerySelector.d.ts +34 -0
- package/cjs/query-selector/QuerySelector.d.ts.map +1 -1
- package/cjs/version.cjs +1 -1
- package/cjs/window/BrowserWindow.cjs +9 -3
- package/cjs/window/BrowserWindow.cjs.map +1 -1
- package/cjs/window/BrowserWindow.d.ts +5 -4
- package/cjs/window/BrowserWindow.d.ts.map +1 -1
- package/cjs/window/CrossOriginBrowserWindow.d.ts +1 -1
- package/cjs/window/CrossOriginBrowserWindow.d.ts.map +1 -1
- package/cjs/window/IBrowserWindow.d.ts +3 -2
- package/cjs/window/IBrowserWindow.d.ts.map +1 -1
- package/cjs/window/ICrossOriginBrowserWindow.d.ts +1 -1
- package/cjs/window/ICrossOriginBrowserWindow.d.ts.map +1 -1
- package/cjs/window/WindowPageOpenUtility.cjs +4 -2
- package/cjs/window/WindowPageOpenUtility.cjs.map +1 -1
- package/cjs/window/WindowPageOpenUtility.d.ts.map +1 -1
- package/lib/PropertySymbol.d.ts +1 -0
- package/lib/PropertySymbol.d.ts.map +1 -1
- package/lib/PropertySymbol.js +1 -0
- package/lib/PropertySymbol.js.map +1 -1
- package/lib/browser/BrowserFrame.d.ts.map +1 -1
- package/lib/browser/BrowserFrame.js +12 -2
- package/lib/browser/BrowserFrame.js.map +1 -1
- package/lib/browser/detached-browser/DetachedBrowserFrame.d.ts.map +1 -1
- package/lib/browser/detached-browser/DetachedBrowserFrame.js +12 -2
- package/lib/browser/detached-browser/DetachedBrowserFrame.js.map +1 -1
- package/lib/browser/utilities/BrowserFrameFactory.d.ts.map +1 -1
- package/lib/browser/utilities/BrowserFrameFactory.js +5 -0
- package/lib/browser/utilities/BrowserFrameFactory.js.map +1 -1
- package/lib/browser/utilities/BrowserFrameNavigator.d.ts +21 -10
- package/lib/browser/utilities/BrowserFrameNavigator.d.ts.map +1 -1
- package/lib/browser/utilities/BrowserFrameNavigator.js +20 -13
- package/lib/browser/utilities/BrowserFrameNavigator.js.map +1 -1
- package/lib/browser/utilities/BrowserFrameURL.d.ts.map +1 -1
- package/lib/browser/utilities/BrowserFrameURL.js +2 -2
- package/lib/browser/utilities/BrowserFrameURL.js.map +1 -1
- package/lib/config/IHTMLElementTagNameMap.d.ts +146 -0
- package/lib/config/IHTMLElementTagNameMap.d.ts.map +1 -0
- package/lib/config/IHTMLElementTagNameMap.js +2 -0
- package/lib/config/IHTMLElementTagNameMap.js.map +1 -0
- package/lib/config/ISVGElementTagNameMap.d.ts +67 -0
- package/lib/config/ISVGElementTagNameMap.d.ts.map +1 -0
- package/lib/config/ISVGElementTagNameMap.js +2 -0
- package/lib/config/ISVGElementTagNameMap.js.map +1 -0
- package/lib/event/events/HashChangeEvent.d.ts +19 -0
- package/lib/event/events/HashChangeEvent.d.ts.map +1 -0
- package/lib/event/events/HashChangeEvent.js +20 -0
- package/lib/event/events/HashChangeEvent.js.map +1 -0
- package/lib/event/events/IHashChangeEventInit.d.ts +6 -0
- package/lib/event/events/IHashChangeEventInit.d.ts.map +1 -0
- package/lib/event/events/IHashChangeEventInit.js +2 -0
- package/lib/event/events/IHashChangeEventInit.js.map +1 -0
- package/lib/fetch/Fetch.d.ts +0 -10
- package/lib/fetch/Fetch.d.ts.map +1 -1
- package/lib/fetch/Fetch.js +10 -34
- package/lib/fetch/Fetch.js.map +1 -1
- package/lib/fetch/Request.js +2 -2
- package/lib/fetch/Request.js.map +1 -1
- package/lib/fetch/Response.d.ts.map +1 -1
- package/lib/fetch/Response.js +2 -6
- package/lib/fetch/Response.js.map +1 -1
- package/lib/fetch/SyncFetch.js +3 -3
- package/lib/fetch/SyncFetch.js.map +1 -1
- package/lib/fetch/utilities/FetchBodyUtility.d.ts +24 -12
- package/lib/fetch/utilities/FetchBodyUtility.d.ts.map +1 -1
- package/lib/fetch/utilities/FetchBodyUtility.js +62 -19
- package/lib/fetch/utilities/FetchBodyUtility.js.map +1 -1
- package/lib/fetch/utilities/FetchRequestHeaderUtility.d.ts.map +1 -1
- package/lib/fetch/utilities/FetchRequestHeaderUtility.js +4 -2
- package/lib/fetch/utilities/FetchRequestHeaderUtility.js.map +1 -1
- package/lib/fetch/utilities/FetchRequestReferrerUtility.d.ts.map +1 -1
- package/lib/fetch/utilities/FetchRequestReferrerUtility.js +1 -1
- package/lib/fetch/utilities/FetchRequestReferrerUtility.js.map +1 -1
- package/lib/form-data/FormData.d.ts +1 -1
- package/lib/form-data/FormData.d.ts.map +1 -1
- package/lib/form-data/FormData.js +1 -1
- package/lib/form-data/FormData.js.map +1 -1
- package/lib/index.d.ts +7 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/location/Location.d.ts +144 -0
- package/lib/location/Location.d.ts.map +1 -0
- package/lib/location/Location.js +241 -0
- package/lib/location/Location.js.map +1 -0
- package/lib/named-node-map/NamedNodeMap.d.ts.map +1 -1
- package/lib/named-node-map/NamedNodeMap.js +2 -1
- package/lib/named-node-map/NamedNodeMap.js.map +1 -1
- package/lib/nodes/document/Document.d.ts +114 -6
- package/lib/nodes/document/Document.d.ts.map +1 -1
- package/lib/nodes/document/Document.js +4 -4
- package/lib/nodes/document/Document.js.map +1 -1
- package/lib/nodes/document/IDocument.d.ts +28 -12
- package/lib/nodes/document/IDocument.d.ts.map +1 -1
- package/lib/nodes/document-fragment/DocumentFragment.d.ts +31 -1
- package/lib/nodes/document-fragment/DocumentFragment.d.ts.map +1 -1
- package/lib/nodes/document-fragment/DocumentFragment.js +2 -2
- package/lib/nodes/document-fragment/DocumentFragment.js.map +1 -1
- package/lib/nodes/document-fragment/IDocumentFragment.d.ts +6 -0
- package/lib/nodes/document-fragment/IDocumentFragment.d.ts.map +1 -1
- package/lib/nodes/element/Element.d.ts +61 -1
- package/lib/nodes/element/Element.d.ts.map +1 -1
- package/lib/nodes/element/Element.js +1 -1
- package/lib/nodes/element/Element.js.map +1 -1
- package/lib/nodes/element/HTMLCollection.d.ts.map +1 -1
- package/lib/nodes/element/HTMLCollection.js +2 -1
- package/lib/nodes/element/HTMLCollection.js.map +1 -1
- package/lib/nodes/html-anchor-element/HTMLAnchorElement.d.ts.map +1 -1
- package/lib/nodes/html-anchor-element/HTMLAnchorElement.js +2 -0
- package/lib/nodes/html-anchor-element/HTMLAnchorElement.js.map +1 -1
- package/lib/nodes/html-button-element/HTMLButtonElement.d.ts +49 -1
- package/lib/nodes/html-button-element/HTMLButtonElement.d.ts.map +1 -1
- package/lib/nodes/html-button-element/HTMLButtonElement.js +93 -4
- package/lib/nodes/html-button-element/HTMLButtonElement.js.map +1 -1
- package/lib/nodes/html-button-element/IHTMLButtonElement.d.ts +5 -1
- package/lib/nodes/html-button-element/IHTMLButtonElement.d.ts.map +1 -1
- package/lib/nodes/html-form-element/HTMLFormControlsCollection.d.ts.map +1 -1
- package/lib/nodes/html-form-element/HTMLFormControlsCollection.js +2 -1
- package/lib/nodes/html-form-element/HTMLFormControlsCollection.js.map +1 -1
- package/lib/nodes/html-form-element/HTMLFormElement.d.ts +8 -2
- package/lib/nodes/html-form-element/HTMLFormElement.d.ts.map +1 -1
- package/lib/nodes/html-form-element/HTMLFormElement.js +106 -10
- package/lib/nodes/html-form-element/HTMLFormElement.js.map +1 -1
- package/lib/nodes/html-iframe-element/HTMLIFrameElement.d.ts +10 -0
- package/lib/nodes/html-iframe-element/HTMLIFrameElement.d.ts.map +1 -1
- package/lib/nodes/html-iframe-element/HTMLIFrameElement.js +14 -0
- package/lib/nodes/html-iframe-element/HTMLIFrameElement.js.map +1 -1
- package/lib/nodes/html-iframe-element/HTMLIFrameElementPageLoader.d.ts.map +1 -1
- package/lib/nodes/html-iframe-element/HTMLIFrameElementPageLoader.js +4 -1
- package/lib/nodes/html-iframe-element/HTMLIFrameElementPageLoader.js.map +1 -1
- package/lib/nodes/html-iframe-element/IHTMLIFrameElement.d.ts +1 -0
- package/lib/nodes/html-iframe-element/IHTMLIFrameElement.d.ts.map +1 -1
- package/lib/nodes/html-input-element/HTMLInputElement.d.ts +49 -23
- package/lib/nodes/html-input-element/HTMLInputElement.d.ts.map +1 -1
- package/lib/nodes/html-input-element/HTMLInputElement.js +100 -52
- package/lib/nodes/html-input-element/HTMLInputElement.js.map +1 -1
- package/lib/nodes/html-input-element/IHTMLInputElement.d.ts +2 -0
- package/lib/nodes/html-input-element/IHTMLInputElement.d.ts.map +1 -1
- package/lib/nodes/html-label-element/HTMLLabelElement.d.ts.map +1 -1
- package/lib/nodes/html-label-element/HTMLLabelElement.js +1 -0
- package/lib/nodes/html-label-element/HTMLLabelElement.js.map +1 -1
- package/lib/nodes/html-link-element/HTMLLinkElementStyleSheetLoader.js +1 -1
- package/lib/nodes/html-link-element/HTMLLinkElementStyleSheetLoader.js.map +1 -1
- package/lib/nodes/html-script-element/HTMLScriptElementScriptLoader.js +1 -1
- package/lib/nodes/html-script-element/HTMLScriptElementScriptLoader.js.map +1 -1
- package/lib/nodes/html-select-element/HTMLSelectElement.d.ts.map +1 -1
- package/lib/nodes/html-select-element/HTMLSelectElement.js.map +1 -1
- package/lib/nodes/node/Node.d.ts.map +1 -1
- package/lib/nodes/node/Node.js.map +1 -1
- package/lib/nodes/parent-node/IParentNode.d.ts +17 -0
- package/lib/nodes/parent-node/IParentNode.d.ts.map +1 -1
- package/lib/nodes/parent-node/ParentNodeUtility.d.ts.map +1 -1
- package/lib/nodes/parent-node/ParentNodeUtility.js.map +1 -1
- package/lib/query-selector/QuerySelector.d.ts +34 -0
- package/lib/query-selector/QuerySelector.d.ts.map +1 -1
- package/lib/query-selector/QuerySelector.js.map +1 -1
- package/lib/version.js +1 -1
- package/lib/window/BrowserWindow.d.ts +5 -4
- package/lib/window/BrowserWindow.d.ts.map +1 -1
- package/lib/window/BrowserWindow.js +10 -4
- package/lib/window/BrowserWindow.js.map +1 -1
- package/lib/window/CrossOriginBrowserWindow.d.ts +1 -1
- package/lib/window/CrossOriginBrowserWindow.d.ts.map +1 -1
- package/lib/window/IBrowserWindow.d.ts +3 -2
- package/lib/window/IBrowserWindow.d.ts.map +1 -1
- package/lib/window/ICrossOriginBrowserWindow.d.ts +1 -1
- package/lib/window/ICrossOriginBrowserWindow.d.ts.map +1 -1
- package/lib/window/WindowPageOpenUtility.d.ts.map +1 -1
- package/lib/window/WindowPageOpenUtility.js +4 -2
- package/lib/window/WindowPageOpenUtility.js.map +1 -1
- package/package.json +1 -1
- package/src/PropertySymbol.ts +1 -0
- package/src/browser/BrowserFrame.ts +12 -2
- package/src/browser/detached-browser/DetachedBrowserFrame.ts +12 -7
- package/src/browser/utilities/BrowserFrameFactory.ts +7 -0
- package/src/browser/utilities/BrowserFrameNavigator.ts +28 -18
- package/src/browser/utilities/BrowserFrameURL.ts +2 -2
- package/src/config/IHTMLElementTagNameMap.ts +151 -0
- package/src/config/ISVGElementTagNameMap.ts +67 -0
- package/src/event/events/HashChangeEvent.ts +25 -0
- package/src/event/events/IHashChangeEventInit.ts +6 -0
- package/src/fetch/Fetch.ts +28 -37
- package/src/fetch/Request.ts +2 -2
- package/src/fetch/Response.ts +3 -6
- package/src/fetch/SyncFetch.ts +3 -3
- package/src/fetch/utilities/FetchBodyUtility.ts +67 -20
- package/src/fetch/utilities/FetchRequestHeaderUtility.ts +4 -5
- package/src/fetch/utilities/FetchRequestReferrerUtility.ts +2 -1
- package/src/form-data/FormData.ts +2 -2
- package/src/index.ts +9 -1
- package/src/location/Location.ts +257 -0
- package/src/named-node-map/NamedNodeMap.ts +1 -0
- package/src/nodes/document/Document.ts +224 -17
- package/src/nodes/document/IDocument.ts +33 -11
- package/src/nodes/document-fragment/DocumentFragment.ts +59 -1
- package/src/nodes/document-fragment/IDocumentFragment.ts +14 -0
- package/src/nodes/element/Element.ts +120 -1
- package/src/nodes/element/HTMLCollection.ts +1 -0
- package/src/nodes/html-anchor-element/HTMLAnchorElement.ts +2 -0
- package/src/nodes/html-button-element/HTMLButtonElement.ts +107 -5
- package/src/nodes/html-button-element/IHTMLButtonElement.ts +5 -1
- package/src/nodes/html-form-element/HTMLFormControlsCollection.ts +1 -0
- package/src/nodes/html-form-element/HTMLFormElement.ts +111 -5
- package/src/nodes/html-iframe-element/HTMLIFrameElement.ts +16 -0
- package/src/nodes/html-iframe-element/HTMLIFrameElementPageLoader.ts +5 -1
- package/src/nodes/html-iframe-element/IHTMLIFrameElement.ts +1 -0
- package/src/nodes/html-input-element/HTMLInputElement.ts +111 -57
- package/src/nodes/html-input-element/IHTMLInputElement.ts +2 -0
- package/src/nodes/html-label-element/HTMLLabelElement.ts +1 -0
- package/src/nodes/html-link-element/HTMLLinkElementStyleSheetLoader.ts +1 -1
- package/src/nodes/html-script-element/HTMLScriptElementScriptLoader.ts +1 -1
- package/src/nodes/html-select-element/HTMLSelectElement.ts +1 -2
- package/src/nodes/node/Node.ts +1 -2
- package/src/nodes/parent-node/IParentNode.ts +36 -0
- package/src/nodes/parent-node/ParentNodeUtility.ts +1 -0
- package/src/query-selector/QuerySelector.ts +76 -2
- package/src/window/BrowserWindow.ts +11 -4
- package/src/window/CrossOriginBrowserWindow.ts +1 -1
- package/src/window/IBrowserWindow.ts +3 -2
- package/src/window/ICrossOriginBrowserWindow.ts +1 -1
- package/src/window/WindowPageOpenUtility.ts +4 -2
- package/cjs/url/Location.cjs +0 -111
- package/cjs/url/Location.cjs.map +0 -1
- package/cjs/url/Location.d.ts +0 -48
- package/cjs/url/Location.d.ts.map +0 -1
- package/lib/url/Location.d.ts +0 -48
- package/lib/url/Location.d.ts.map +0 -1
- package/lib/url/Location.js +0 -82
- package/lib/url/Location.js.map +0 -1
- package/src/url/Location.ts +0 -79
package/cjs/url/Location.cjs
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
26
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
27
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
28
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
29
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
30
|
-
};
|
31
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
32
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
33
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
34
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
35
|
-
};
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
38
|
-
};
|
39
|
-
var _Location_browserFrame;
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
-
const URL_js_1 = __importDefault(require("./URL.cjs"));
|
42
|
-
const PropertySymbol = __importStar(require("../PropertySymbol.cjs"));
|
43
|
-
/**
|
44
|
-
* Location.
|
45
|
-
*/
|
46
|
-
class Location extends URL_js_1.default {
|
47
|
-
/**
|
48
|
-
* Constructor.
|
49
|
-
*
|
50
|
-
* @param browserFrame Browser frame.
|
51
|
-
* @param url URL.
|
52
|
-
*/
|
53
|
-
constructor(browserFrame, url) {
|
54
|
-
super(url);
|
55
|
-
_Location_browserFrame.set(this, void 0);
|
56
|
-
__classPrivateFieldSet(this, _Location_browserFrame, browserFrame, "f");
|
57
|
-
}
|
58
|
-
/**
|
59
|
-
* Override set href.
|
60
|
-
*/
|
61
|
-
// @ts-ignore
|
62
|
-
set href(url) {
|
63
|
-
__classPrivateFieldGet(this, _Location_browserFrame, "f").goto(url).catch((error) => __classPrivateFieldGet(this, _Location_browserFrame, "f").page.console.error(error));
|
64
|
-
}
|
65
|
-
/**
|
66
|
-
* Override set href.
|
67
|
-
*/
|
68
|
-
get href() {
|
69
|
-
// @ts-ignore
|
70
|
-
return super.href;
|
71
|
-
}
|
72
|
-
/**
|
73
|
-
* Replaces the current resource with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session History, meaning the user won't be able to use the back button to navigate to it.
|
74
|
-
*
|
75
|
-
* @param url URL.
|
76
|
-
*/
|
77
|
-
replace(url) {
|
78
|
-
this.href = url;
|
79
|
-
}
|
80
|
-
/**
|
81
|
-
* Loads the resource at the URL provided in parameter.
|
82
|
-
*
|
83
|
-
* @param url URL.
|
84
|
-
*/
|
85
|
-
assign(url) {
|
86
|
-
this.href = url;
|
87
|
-
}
|
88
|
-
/**
|
89
|
-
* Reloads the resource from the current URL.
|
90
|
-
*/
|
91
|
-
reload() {
|
92
|
-
__classPrivateFieldGet(this, _Location_browserFrame, "f")
|
93
|
-
.goto(this.href)
|
94
|
-
.catch((error) => __classPrivateFieldGet(this, _Location_browserFrame, "f").page.console.error(error));
|
95
|
-
}
|
96
|
-
/**
|
97
|
-
* Replaces the current URL state with the provided one without navigating to the new URL.
|
98
|
-
*
|
99
|
-
* @param browserFrame Browser frame that must match the current one as validation.
|
100
|
-
* @param url URL.
|
101
|
-
*/
|
102
|
-
[(_Location_browserFrame = new WeakMap(), PropertySymbol.setURL)](browserFrame, url) {
|
103
|
-
if (__classPrivateFieldGet(this, _Location_browserFrame, "f") !== browserFrame) {
|
104
|
-
throw new Error('Failed to set URL. Browser frame mismatch.');
|
105
|
-
}
|
106
|
-
// @ts-ignore
|
107
|
-
super.href = url;
|
108
|
-
}
|
109
|
-
}
|
110
|
-
exports.default = Location;
|
111
|
-
//# sourceMappingURL=Location.cjs.map
|
package/cjs/url/Location.cjs.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Location.cjs","sourceRoot":"","sources":["../../src/url/Location.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAA2B;AAE3B,qEAAuD;AAEvD;;GAEG;AACH,MAAqB,QAAS,SAAQ,gBAAG;IAGxC;;;;;OAKG;IACH,YAAY,YAA2B,EAAE,GAAW;QACnD,KAAK,CAAC,GAAG,CAAC,CAAC;QATZ,yCAA6B;QAU5B,uBAAA,IAAI,0BAAiB,YAAY,MAAA,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,aAAa;IACb,IAAW,IAAI,CAAC,GAAW;QAC1B,uBAAA,IAAI,8BAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAA,IAAI,8BAAc,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACd,aAAa;QACb,OAAO,KAAK,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACI,OAAO,CAAC,GAAW;QACzB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,GAAW;QACxB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;OAEG;IACI,MAAM;QACZ,uBAAA,IAAI,8BAAc;aAChB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;aACf,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAA,IAAI,8BAAc,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;;OAKG;IACI,0CAAC,cAAc,CAAC,MAAM,EAAC,CAAC,YAA2B,EAAE,GAAW;QACtE,IAAI,uBAAA,IAAI,8BAAc,KAAK,YAAY,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAC/D,CAAC;QAED,aAAa;QACb,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;CACD;AAvED,2BAuEC"}
|
package/cjs/url/Location.d.ts
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
import URL from './URL.cjs';
|
2
|
-
import IBrowserFrame from '../browser/types/IBrowserFrame.cjs';
|
3
|
-
import * as PropertySymbol from '../PropertySymbol.cjs';
|
4
|
-
/**
|
5
|
-
* Location.
|
6
|
-
*/
|
7
|
-
export default class Location extends URL {
|
8
|
-
#private;
|
9
|
-
/**
|
10
|
-
* Constructor.
|
11
|
-
*
|
12
|
-
* @param browserFrame Browser frame.
|
13
|
-
* @param url URL.
|
14
|
-
*/
|
15
|
-
constructor(browserFrame: IBrowserFrame, url: string);
|
16
|
-
/**
|
17
|
-
* Override set href.
|
18
|
-
*/
|
19
|
-
set href(url: string);
|
20
|
-
/**
|
21
|
-
* Override set href.
|
22
|
-
*/
|
23
|
-
get href(): string;
|
24
|
-
/**
|
25
|
-
* Replaces the current resource with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session History, meaning the user won't be able to use the back button to navigate to it.
|
26
|
-
*
|
27
|
-
* @param url URL.
|
28
|
-
*/
|
29
|
-
replace(url: string): void;
|
30
|
-
/**
|
31
|
-
* Loads the resource at the URL provided in parameter.
|
32
|
-
*
|
33
|
-
* @param url URL.
|
34
|
-
*/
|
35
|
-
assign(url: string): void;
|
36
|
-
/**
|
37
|
-
* Reloads the resource from the current URL.
|
38
|
-
*/
|
39
|
-
reload(): void;
|
40
|
-
/**
|
41
|
-
* Replaces the current URL state with the provided one without navigating to the new URL.
|
42
|
-
*
|
43
|
-
* @param browserFrame Browser frame that must match the current one as validation.
|
44
|
-
* @param url URL.
|
45
|
-
*/
|
46
|
-
[PropertySymbol.setURL](browserFrame: IBrowserFrame, url: string): void;
|
47
|
-
}
|
48
|
-
//# sourceMappingURL=Location.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Location.d.ts","sourceRoot":"","sources":["../../src/url/Location.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,GAAG;;IAGxC;;;;;OAKG;gBACS,YAAY,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM;IAKpD;;OAEG;IAEH,IAAW,IAAI,CAAC,GAAG,EAAE,MAAM,EAE1B;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAGxB;IAED;;;;OAIG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIjC;;;;OAIG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC;;OAEG;IACI,MAAM,IAAI,IAAI;IAMrB;;;;;OAKG;IACI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;CAQ9E"}
|
package/lib/url/Location.d.ts
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
import URL from './URL.js';
|
2
|
-
import IBrowserFrame from '../browser/types/IBrowserFrame.js';
|
3
|
-
import * as PropertySymbol from '../PropertySymbol.js';
|
4
|
-
/**
|
5
|
-
* Location.
|
6
|
-
*/
|
7
|
-
export default class Location extends URL {
|
8
|
-
#private;
|
9
|
-
/**
|
10
|
-
* Constructor.
|
11
|
-
*
|
12
|
-
* @param browserFrame Browser frame.
|
13
|
-
* @param url URL.
|
14
|
-
*/
|
15
|
-
constructor(browserFrame: IBrowserFrame, url: string);
|
16
|
-
/**
|
17
|
-
* Override set href.
|
18
|
-
*/
|
19
|
-
set href(url: string);
|
20
|
-
/**
|
21
|
-
* Override set href.
|
22
|
-
*/
|
23
|
-
get href(): string;
|
24
|
-
/**
|
25
|
-
* Replaces the current resource with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session History, meaning the user won't be able to use the back button to navigate to it.
|
26
|
-
*
|
27
|
-
* @param url URL.
|
28
|
-
*/
|
29
|
-
replace(url: string): void;
|
30
|
-
/**
|
31
|
-
* Loads the resource at the URL provided in parameter.
|
32
|
-
*
|
33
|
-
* @param url URL.
|
34
|
-
*/
|
35
|
-
assign(url: string): void;
|
36
|
-
/**
|
37
|
-
* Reloads the resource from the current URL.
|
38
|
-
*/
|
39
|
-
reload(): void;
|
40
|
-
/**
|
41
|
-
* Replaces the current URL state with the provided one without navigating to the new URL.
|
42
|
-
*
|
43
|
-
* @param browserFrame Browser frame that must match the current one as validation.
|
44
|
-
* @param url URL.
|
45
|
-
*/
|
46
|
-
[PropertySymbol.setURL](browserFrame: IBrowserFrame, url: string): void;
|
47
|
-
}
|
48
|
-
//# sourceMappingURL=Location.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Location.d.ts","sourceRoot":"","sources":["../../src/url/Location.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,GAAG;;IAGxC;;;;;OAKG;gBACS,YAAY,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM;IAKpD;;OAEG;IAEH,IAAW,IAAI,CAAC,GAAG,EAAE,MAAM,EAE1B;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAGxB;IAED;;;;OAIG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIjC;;;;OAIG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC;;OAEG;IACI,MAAM,IAAI,IAAI;IAMrB;;;;;OAKG;IACI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;CAQ9E"}
|
package/lib/url/Location.js
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
2
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
5
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
6
|
-
};
|
7
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
8
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
9
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
10
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
11
|
-
};
|
12
|
-
var _Location_browserFrame;
|
13
|
-
import URL from './URL.js';
|
14
|
-
import * as PropertySymbol from '../PropertySymbol.js';
|
15
|
-
/**
|
16
|
-
* Location.
|
17
|
-
*/
|
18
|
-
export default class Location extends URL {
|
19
|
-
/**
|
20
|
-
* Constructor.
|
21
|
-
*
|
22
|
-
* @param browserFrame Browser frame.
|
23
|
-
* @param url URL.
|
24
|
-
*/
|
25
|
-
constructor(browserFrame, url) {
|
26
|
-
super(url);
|
27
|
-
_Location_browserFrame.set(this, void 0);
|
28
|
-
__classPrivateFieldSet(this, _Location_browserFrame, browserFrame, "f");
|
29
|
-
}
|
30
|
-
/**
|
31
|
-
* Override set href.
|
32
|
-
*/
|
33
|
-
// @ts-ignore
|
34
|
-
set href(url) {
|
35
|
-
__classPrivateFieldGet(this, _Location_browserFrame, "f").goto(url).catch((error) => __classPrivateFieldGet(this, _Location_browserFrame, "f").page.console.error(error));
|
36
|
-
}
|
37
|
-
/**
|
38
|
-
* Override set href.
|
39
|
-
*/
|
40
|
-
get href() {
|
41
|
-
// @ts-ignore
|
42
|
-
return super.href;
|
43
|
-
}
|
44
|
-
/**
|
45
|
-
* Replaces the current resource with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session History, meaning the user won't be able to use the back button to navigate to it.
|
46
|
-
*
|
47
|
-
* @param url URL.
|
48
|
-
*/
|
49
|
-
replace(url) {
|
50
|
-
this.href = url;
|
51
|
-
}
|
52
|
-
/**
|
53
|
-
* Loads the resource at the URL provided in parameter.
|
54
|
-
*
|
55
|
-
* @param url URL.
|
56
|
-
*/
|
57
|
-
assign(url) {
|
58
|
-
this.href = url;
|
59
|
-
}
|
60
|
-
/**
|
61
|
-
* Reloads the resource from the current URL.
|
62
|
-
*/
|
63
|
-
reload() {
|
64
|
-
__classPrivateFieldGet(this, _Location_browserFrame, "f")
|
65
|
-
.goto(this.href)
|
66
|
-
.catch((error) => __classPrivateFieldGet(this, _Location_browserFrame, "f").page.console.error(error));
|
67
|
-
}
|
68
|
-
/**
|
69
|
-
* Replaces the current URL state with the provided one without navigating to the new URL.
|
70
|
-
*
|
71
|
-
* @param browserFrame Browser frame that must match the current one as validation.
|
72
|
-
* @param url URL.
|
73
|
-
*/
|
74
|
-
[(_Location_browserFrame = new WeakMap(), PropertySymbol.setURL)](browserFrame, url) {
|
75
|
-
if (__classPrivateFieldGet(this, _Location_browserFrame, "f") !== browserFrame) {
|
76
|
-
throw new Error('Failed to set URL. Browser frame mismatch.');
|
77
|
-
}
|
78
|
-
// @ts-ignore
|
79
|
-
super.href = url;
|
80
|
-
}
|
81
|
-
}
|
82
|
-
//# sourceMappingURL=Location.js.map
|
package/lib/url/Location.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Location.js","sourceRoot":"","sources":["../../src/url/Location.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,GAAG;IAGxC;;;;;OAKG;IACH,YAAY,YAA2B,EAAE,GAAW;QACnD,KAAK,CAAC,GAAG,CAAC,CAAC;QATZ,yCAA6B;QAU5B,uBAAA,IAAI,0BAAiB,YAAY,MAAA,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,aAAa;IACb,IAAW,IAAI,CAAC,GAAW;QAC1B,uBAAA,IAAI,8BAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAA,IAAI,8BAAc,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACd,aAAa;QACb,OAAO,KAAK,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACI,OAAO,CAAC,GAAW;QACzB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,GAAW;QACxB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;OAEG;IACI,MAAM;QACZ,uBAAA,IAAI,8BAAc;aAChB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;aACf,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAA,IAAI,8BAAc,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;;OAKG;IACI,0CAAC,cAAc,CAAC,MAAM,EAAC,CAAC,YAA2B,EAAE,GAAW;QACtE,IAAI,uBAAA,IAAI,8BAAc,KAAK,YAAY,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAC/D,CAAC;QAED,aAAa;QACb,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;CACD"}
|
package/src/url/Location.ts
DELETED
@@ -1,79 +0,0 @@
|
|
1
|
-
import URL from './URL.js';
|
2
|
-
import IBrowserFrame from '../browser/types/IBrowserFrame.js';
|
3
|
-
import * as PropertySymbol from '../PropertySymbol.js';
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Location.
|
7
|
-
*/
|
8
|
-
export default class Location extends URL {
|
9
|
-
#browserFrame: IBrowserFrame;
|
10
|
-
|
11
|
-
/**
|
12
|
-
* Constructor.
|
13
|
-
*
|
14
|
-
* @param browserFrame Browser frame.
|
15
|
-
* @param url URL.
|
16
|
-
*/
|
17
|
-
constructor(browserFrame: IBrowserFrame, url: string) {
|
18
|
-
super(url);
|
19
|
-
this.#browserFrame = browserFrame;
|
20
|
-
}
|
21
|
-
|
22
|
-
/**
|
23
|
-
* Override set href.
|
24
|
-
*/
|
25
|
-
// @ts-ignore
|
26
|
-
public set href(url: string) {
|
27
|
-
this.#browserFrame.goto(url).catch((error) => this.#browserFrame.page.console.error(error));
|
28
|
-
}
|
29
|
-
|
30
|
-
/**
|
31
|
-
* Override set href.
|
32
|
-
*/
|
33
|
-
public get href(): string {
|
34
|
-
// @ts-ignore
|
35
|
-
return super.href;
|
36
|
-
}
|
37
|
-
|
38
|
-
/**
|
39
|
-
* Replaces the current resource with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session History, meaning the user won't be able to use the back button to navigate to it.
|
40
|
-
*
|
41
|
-
* @param url URL.
|
42
|
-
*/
|
43
|
-
public replace(url: string): void {
|
44
|
-
this.href = url;
|
45
|
-
}
|
46
|
-
|
47
|
-
/**
|
48
|
-
* Loads the resource at the URL provided in parameter.
|
49
|
-
*
|
50
|
-
* @param url URL.
|
51
|
-
*/
|
52
|
-
public assign(url: string): void {
|
53
|
-
this.href = url;
|
54
|
-
}
|
55
|
-
|
56
|
-
/**
|
57
|
-
* Reloads the resource from the current URL.
|
58
|
-
*/
|
59
|
-
public reload(): void {
|
60
|
-
this.#browserFrame
|
61
|
-
.goto(this.href)
|
62
|
-
.catch((error) => this.#browserFrame.page.console.error(error));
|
63
|
-
}
|
64
|
-
|
65
|
-
/**
|
66
|
-
* Replaces the current URL state with the provided one without navigating to the new URL.
|
67
|
-
*
|
68
|
-
* @param browserFrame Browser frame that must match the current one as validation.
|
69
|
-
* @param url URL.
|
70
|
-
*/
|
71
|
-
public [PropertySymbol.setURL](browserFrame: IBrowserFrame, url: string): void {
|
72
|
-
if (this.#browserFrame !== browserFrame) {
|
73
|
-
throw new Error('Failed to set URL. Browser frame mismatch.');
|
74
|
-
}
|
75
|
-
|
76
|
-
// @ts-ignore
|
77
|
-
super.href = url;
|
78
|
-
}
|
79
|
-
}
|