Search completed in 1.17 seconds.
3 results for "appendmedium":
StyleSheet.media - Web APIs
The media property of the StyleSheet interface specifies the intended destination media for style information. It is a read-only, array-like MediaList object and can be removed with deleteMedium() and added with
appendMedium(). ...
...type="text/css" media="screen, print"> body { background-color: snow; } </style> </head> <body> <script> for (var iSheetIndex = 0; iSheetIndex < document.styleSheets.length; iSheetIndex++) { console.log('document.styleSheets[' + String(iSheetIndex) + '].media: ' + JSON.stringify(document.styleSheets[iSheetIndex].media)); if (iSheetIndex === 0) document.styleSheets[iSheetIndex].media.
appendMedium('handheld'); if (iSheetIndex === 1) document.styleSheets[iSheetIndex].media.deleteMedium('print'); console.log('document.styleSheets[' + String(iSheetIndex) + '].media: ' + JSON.stringify(document.styleSheets[iSheetIndex].media)); } /* will log: document.styleSheets[0].media: {"0":"screen"} document.styleSheets[0].media: {"0":"screen","1":"handheld"} document.styleSheets[1].media: {"0...
Index - Web APIs
perty of the StyleSheet interface determines whether the style sheet is prevented from applying to the document. 4191 StyleSheet.media API, CSSOM, Property, Reference The media property of the StyleSheet interface specifies the intended destination media for style information. It is a read-only, array-like MediaList object and can be removed with deleteMedium() and added with
appendMedium(). 4192 StyleSheet.ownerNode API, CSSOM, NeedsSpecTable, Property, Reference The ownerNode property of the StyleSheet interface returns the node that associates this style sheet with the document. 4193 StyleSheet.parentStyleSheet API, CSSOM, NeedsSpecTable, Property, Reference The parentStyleSheet property of the StyleSheet interface returns the style she...
MediaList - Web APIs
diaList is a live list; updating the list using properties or methods listed below will immediately update the behavior of the document. Properties MediaList.mediaText A stringifier that returns a DOMString representing the MediaList as text, and also allows you to set a new MediaList. MediaList.length Read only Returns the number of media queries in the MediaList. Methods MediaList.
appendMedium() Adds a media query to the MediaList. MediaList.deleteMedium() Removes a media query from the MediaList. MediaList.item() A getter that returns a CSSOMString representing a media query as text, given the media query's index value inside the MediaList. Examples The following would log to the console a textual representation of the MediaList of the first stylesheet applied to the current d...