UNPKG

665 BJavaScriptView Raw
1/**
2 * Function returning the current Meta Boxes DOM Node in the editor
3 * whether the meta box area is opened or not.
4 * If the MetaBox Area is visible returns it, and returns the original container instead.
5 *
6 * @param {string} location Meta Box location.
7 * @return {string} HTML content.
8 */
9export var getMetaBoxContainer = function getMetaBoxContainer(location) {
10 var area = document.querySelector(".edit-post-meta-boxes-area.is-".concat(location, " .metabox-location-").concat(location));
11
12 if (area) {
13 return area;
14 }
15
16 return document.querySelector('#metaboxes .metabox-location-' + location);
17};
18//# sourceMappingURL=meta-boxes.js.map
\No newline at end of file