Socket
Socket
Sign inDemoInstall

@fluentui/dom-utilities

Package Overview
Dependencies
Maintainers
12
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/dom-utilities - npm Package Compare versions

Comparing version 2.2.13 to 2.2.14

23

CHANGELOG.json

@@ -5,3 +5,24 @@ {

{
"date": "Thu, 14 Dec 2023 07:27:16 GMT",
"date": "Wed, 10 Jan 2024 07:26:01 GMT",
"tag": "@fluentui/dom-utilities_v2.2.14",
"version": "2.2.14",
"comments": {
"patch": [
{
"author": "seanmonahan@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "5858fe05255460fa9b13370e613c5243ae3b92d0",
"comment": "chore: disallow document and window access"
},
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.14",
"commit": "5858fe05255460fa9b13370e613c5243ae3b92d0"
}
]
}
},
{
"date": "Thu, 14 Dec 2023 07:30:10 GMT",
"tag": "@fluentui/dom-utilities_v2.2.13",

@@ -8,0 +29,0 @@ "version": "2.2.13",

# Change Log - @fluentui/dom-utilities
This log was last generated on Thu, 14 Dec 2023 07:27:16 GMT and should not be manually modified.
This log was last generated on Wed, 10 Jan 2024 07:26:01 GMT and should not be manually modified.
<!-- Start content -->
## [2.2.14](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.14)
Wed, 10 Jan 2024 07:26:01 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.13..@fluentui/dom-utilities_v2.2.14)
### Patches
- chore: disallow document and window access ([PR #30063](https://github.com/microsoft/fluentui/pull/30063) by seanmonahan@microsoft.com)
- Bump @fluentui/set-version to v8.2.14 ([PR #30063](https://github.com/microsoft/fluentui/pull/30063) by beachball)
## [2.2.13](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.13)
Thu, 14 Dec 2023 07:27:16 GMT
Thu, 14 Dec 2023 07:30:10 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.12..@fluentui/dom-utilities_v2.2.13)

@@ -11,0 +21,0 @@

6

dist/dom-utilities.d.ts

@@ -18,3 +18,3 @@ export declare const DATA_PORTAL_ATTRIBUTE = "data-portal-element";

*/
export declare function elementContainsAttribute(element: HTMLElement, attribute: string): string | null;
export declare function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null;

@@ -27,3 +27,3 @@ /**

*/
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean): HTMLElement | null;
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean, doc?: Document): HTMLElement | null;

@@ -81,3 +81,3 @@ /**

*/
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement): boolean;
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean;

@@ -84,0 +84,0 @@ /**

@@ -14,6 +14,6 @@ ## API Report File for "@fluentui/dom-utilities"

// @public
export function elementContainsAttribute(element: HTMLElement, attribute: string): string | null;
export function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null;
// @public
export function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean): HTMLElement | null;
export function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean, doc?: Document): HTMLElement | null;

@@ -42,3 +42,3 @@ // @public

// @public
export function portalContainsElement(target: HTMLElement, parent?: HTMLElement): boolean;
export function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean;

@@ -51,5 +51,4 @@ // @public

// (No @packageDocumentation comment for this package)
```

@@ -7,2 +7,2 @@ /**

*/
export declare function elementContainsAttribute(element: HTMLElement, attribute: string): string | null;
export declare function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null;

@@ -11,4 +11,4 @@ define(["require", "exports", "./findElementRecursive"], function (require, exports, findElementRecursive_1) {

*/
function elementContainsAttribute(element, attribute) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(element, function (testElement) { return testElement.hasAttribute(attribute); });
function elementContainsAttribute(element, attribute, doc) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(element, function (testElement) { return testElement.hasAttribute(attribute); }, doc);
return elementMatch && elementMatch.getAttribute(attribute);

@@ -15,0 +15,0 @@ }

@@ -7,2 +7,2 @@ /**

*/
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean): HTMLElement | null;
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean, doc?: Document): HTMLElement | null;

@@ -11,4 +11,6 @@ define(["require", "exports", "./getParent"], function (require, exports, getParent_1) {

*/
function findElementRecursive(element, matchFunction) {
if (!element || element === document.body) {
function findElementRecursive(element, matchFunction, doc) {
// eslint-disable-next-line no-restricted-globals
doc !== null && doc !== void 0 ? doc : (doc = document);
if (!element || element === doc.body) {
return null;

@@ -15,0 +17,0 @@ }

@@ -9,2 +9,2 @@ /**

*/
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement): boolean;
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean;

@@ -13,4 +13,4 @@ define(["require", "exports", "./findElementRecursive", "./setPortalAttribute"], function (require, exports, findElementRecursive_1, setPortalAttribute_1) {

*/
function portalContainsElement(target, parent) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(target, function (testElement) { return parent === testElement || testElement.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE); });
function portalContainsElement(target, parent, doc) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(target, function (testElement) { return parent === testElement || testElement.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE); }, doc);
return elementMatch !== null && elementMatch.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE);

@@ -17,0 +17,0 @@ }

define(["require", "exports", "@fluentui/set-version"], function (require, exports, set_version_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
(0, set_version_1.setVersion)('@fluentui/dom-utilities', '2.2.13');
(0, set_version_1.setVersion)('@fluentui/dom-utilities', '2.2.14');
});
//# sourceMappingURL=version.js.map

@@ -7,2 +7,2 @@ /**

*/
export declare function elementContainsAttribute(element: HTMLElement, attribute: string): string | null;
export declare function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null;

@@ -11,4 +11,4 @@ "use strict";

*/
function elementContainsAttribute(element, attribute) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(element, function (testElement) { return testElement.hasAttribute(attribute); });
function elementContainsAttribute(element, attribute, doc) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(element, function (testElement) { return testElement.hasAttribute(attribute); }, doc);
return elementMatch && elementMatch.getAttribute(attribute);

@@ -15,0 +15,0 @@ }

@@ -7,2 +7,2 @@ /**

*/
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean): HTMLElement | null;
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean, doc?: Document): HTMLElement | null;

@@ -11,4 +11,6 @@ "use strict";

*/
function findElementRecursive(element, matchFunction) {
if (!element || element === document.body) {
function findElementRecursive(element, matchFunction, doc) {
// eslint-disable-next-line no-restricted-globals
doc !== null && doc !== void 0 ? doc : (doc = document);
if (!element || element === doc.body) {
return null;

@@ -15,0 +17,0 @@ }

@@ -9,2 +9,2 @@ /**

*/
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement): boolean;
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean;

@@ -14,4 +14,4 @@ "use strict";

*/
function portalContainsElement(target, parent) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(target, function (testElement) { return parent === testElement || testElement.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE); });
function portalContainsElement(target, parent, doc) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(target, function (testElement) { return parent === testElement || testElement.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE); }, doc);
return elementMatch !== null && elementMatch.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE);

@@ -18,0 +18,0 @@ }

@@ -6,3 +6,3 @@ "use strict";

var set_version_1 = require("@fluentui/set-version");
(0, set_version_1.setVersion)('@fluentui/dom-utilities', '2.2.13');
(0, set_version_1.setVersion)('@fluentui/dom-utilities', '2.2.14');
//# sourceMappingURL=version.js.map

@@ -7,2 +7,2 @@ /**

*/
export declare function elementContainsAttribute(element: HTMLElement, attribute: string): string | null;
export declare function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null;

@@ -8,6 +8,6 @@ import { findElementRecursive } from './findElementRecursive';

*/
export function elementContainsAttribute(element, attribute) {
var elementMatch = findElementRecursive(element, function (testElement) { return testElement.hasAttribute(attribute); });
export function elementContainsAttribute(element, attribute, doc) {
var elementMatch = findElementRecursive(element, function (testElement) { return testElement.hasAttribute(attribute); }, doc);
return elementMatch && elementMatch.getAttribute(attribute);
}
//# sourceMappingURL=elementContainsAttribute.js.map

@@ -7,2 +7,2 @@ /**

*/
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean): HTMLElement | null;
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean, doc?: Document): HTMLElement | null;

@@ -8,4 +8,6 @@ import { getParent } from './getParent';

*/
export function findElementRecursive(element, matchFunction) {
if (!element || element === document.body) {
export function findElementRecursive(element, matchFunction, doc) {
// eslint-disable-next-line no-restricted-globals
doc !== null && doc !== void 0 ? doc : (doc = document);
if (!element || element === doc.body) {
return null;

@@ -12,0 +14,0 @@ }

@@ -9,2 +9,2 @@ /**

*/
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement): boolean;
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean;

@@ -11,6 +11,6 @@ import { findElementRecursive } from './findElementRecursive';

*/
export function portalContainsElement(target, parent) {
var elementMatch = findElementRecursive(target, function (testElement) { return parent === testElement || testElement.hasAttribute(DATA_PORTAL_ATTRIBUTE); });
export function portalContainsElement(target, parent, doc) {
var elementMatch = findElementRecursive(target, function (testElement) { return parent === testElement || testElement.hasAttribute(DATA_PORTAL_ATTRIBUTE); }, doc);
return elementMatch !== null && elementMatch.hasAttribute(DATA_PORTAL_ATTRIBUTE);
}
//# sourceMappingURL=portalContainsElement.js.map
// Do not modify this file; it is generated as part of publish.
// The checked in version is a placeholder only and will not be updated.
import { setVersion } from '@fluentui/set-version';
setVersion('@fluentui/dom-utilities', '2.2.13');
setVersion('@fluentui/dom-utilities', '2.2.14');
//# sourceMappingURL=version.js.map
{
"name": "@fluentui/dom-utilities",
"version": "2.2.13",
"version": "2.2.14",
"description": "DOM utilities for use within Fluent web components",

@@ -32,3 +32,3 @@ "main": "lib-commonjs/index.js",

"dependencies": {
"@fluentui/set-version": "^8.2.13",
"@fluentui/set-version": "^8.2.14",
"tslib": "^2.1.0"

@@ -35,0 +35,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc